This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Framework 6.2.0!spring-doc.cn

Further Resources

JUnit

"A programmer-friendly testing framework for Java and the JVM". Used by the Spring Framework in its test suite and supported in the Spring TestContext Framework.spring-doc.cn

TestNG

A testing framework inspired by JUnit with added support for test groups, data-driven testing, distributed testing, and other features. Supported in the Spring TestContext Framework.spring-doc.cn

AssertJ

"Fluent assertions for Java", including support for Java 8 lambdas, streams, and numerous other features. Supported in Spring’s MockMvc testing support.spring-doc.cn

Mock Objects

Article in Wikipedia.spring-doc.cn

Mockito

Java mock library based on the Test Spy pattern. Used by the Spring Framework in its test suite.spring-doc.cn

EasyMock

Java library "that provides Mock Objects for interfaces (and objects through the class extension) by generating them on the fly using Java’s proxy mechanism."spring-doc.cn

JMock

Library that supports test-driven development of Java code with mock objects.spring-doc.cn

DbUnit

JUnit extension (also usable with Ant and Maven) that is targeted at database-driven projects and, among other things, puts your database into a known state between test runs.spring-doc.cn

Testcontainers

Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.spring-doc.cn

The Grinder

Java load testing framework.spring-doc.cn

SpringMockK

Support for Spring Boot integration tests written in Kotlin using MockK instead of Mockito.spring-doc.cn