Learn how to write integration tests with @SpringBootTest. Learn different options for customizing the application context for the tests.
Learn how to test WebClient REST calls with MockWebServer. Learn the responsibilities of a web client and how to test them.
Learn how to test JSON serialization in Spring Boot using @JsonTest. Learn why to test serialization separately and how.
Learn how to test Spring Boot repositories using @DataJpaTest. Learn what should be tested on the persistence layer and how.
Learn how to test Spring Boot web controllers using @WebMvcTest. Learn what responsibilities a controller has and how to test them.
Learn how to write unit tests for Spring Boot applications. Learn the technical details necessary to write good unit tests.
Learn how to write JUnit 5 nested tests. Learn how to provide a hierarchical structure to describe relationships between the tests.
In this article, we will learn different ways to improve test readability. Tests document how the system should behave. They also act as self-verifying executable specifications.
Learn how to use the test data builder pattern to make it easy to create objects for tests. Learn how to reduce boilerplate code with Lombok.