> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/43.-testing/43.1-test-scope-dependencies.md).

# 43.1 测试作用域依赖

`spring-boot-starter-test`“Starter”（在`test` `scope`内）包含下列库：

* [JUnit](http://junit.org/)：事实上的(de-facto)标准，用于Java应用的单元测试。
* [Spring Test](https://docs.spring.io/spring/docs/5.0.4.RELEASE/spring-framework-reference/testing.html#integration-testing) & Spring Boot Test：实用工具以及对Spring应用的集成测试支持。
* [AssertJ](https://joel-costigliola.github.io/assertj/)：一个流式断言库。
* [Hamcrest](http://hamcrest.org/JavaHamcrest/)：一个匹配对象的库（也称为约束或前置条件）。
* [Mockito](http://mockito.org/)：一个Java模拟框架。
* [JSONassert](https://github.com/skyscreamer/JSONassert)：一个针对JSON的断言库。
* [JsonPath](https://github.com/jayway/JsonPath)：用于JSON的XPath。

这是写测试用例经常用到的库，如果它们不能满足要求，你可以随意添加其他的依赖。
