# 3.1概览

能够执行某些集成测试非常重要，无需部署到应用程序服务器或连接到其他企业基础结构。这样做可以让你测试以下内容：

* Spring IoC容器上下文的正确连接。
* 使用JDBC或ORM工具进行数据访问。这可以包括诸如SQL语句的正确性，Hibernate查询，JPA实体映射等等。

Spring Framework为spring-test模块中的集成测试提供了一流的支持。实际JAR文件的名称可能包含发行版本，也可能是长的org.springframework.test形式，具体取决于你从何处获取（有关说明，请参阅依赖关系管理部分）。该库包含org.springframework.test包，其中包含用于使用Spring容器进行集成测试的有价值的类。此测试不依赖于应用程序服务器或其他部署环境。这些测试比单元测试运行得慢，但比依赖部署到应用服务器的等效Selenium测试或远程测试快得多。

单元和集成测试支持以注解驱动的Spring TestContext Framework的形式提供。 TestContext框架与使用中的实际测试框架无关，它允许在各种环境中检测测试，包括JUnit，TestNG等。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flydean.com/spring-framework-documentation5/testing/integration-testing/3.1overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
