@SpringBootTest
The Spring Boot test annotation that starts the complete application context, proving that all the wiring works together.
In more detail
It is slower than a slice but catches missing beans, bad configuration and routing that only appear when everything is assembled. Combined with Testcontainers it can run against a real database as well.
Related terms
- test slice — A Spring Boot test that starts only one layer of the application, such as the web layer with @WebMvcTest, to stay fast.
- application context — The running Spring container: the object that holds every bean for an application and manages their creation and shutdown.
- integration test — A test that checks several real parts working together, such as the service talking to a real database.
Taught in
- Testing APIs With MockMvc — Modern Java: Virtual Threads & High-Throughput Services