@SpringBootTest
@SpringBootTest is a Spring Boot testing annotation that loads an application context with Spring Boot support for integration testing.
Spring in Action, Sixth Edition
@SpringBootTest is a Spring Boot testing annotation that loads an application context with Spring Boot test support.
- How it is used
- Checks that a Spring application context can load successfully during automated JUnit testing.
- How deep it goes
- Explains context loading and composite annotation behavior, but defers the annotation's additional capabilities.
- Examples
- Uses TacoCloudApplicationTests with an empty contextLoads test and the ./mvnw test command.
- What you can do after
- Diagnose configuration changes that prevent the Spring application context from being created.
Read how Spring in Action, Sixth Edition explains @SpringBootTest →
Spring Security in Action, Second Edition
@SpringBootTest is a Spring Boot test annotation that loads an application context for integration testing.
- How it is used
- Manages the Spring context for integration-style security tests that exercise endpoint behavior.
- How deep it goes
- Defines context management and endpoint-test integration, but does not detail Spring context internals.
- Examples
- Uses MainTests, MockMvc calls to /hello, and 401 or 200 status assertions.
- What you can do after
- Evaluate endpoint authorization by running MockMvc requests inside a managed Spring context.
Read how Spring Security in Action, Second Edition explains @SpringBootTest →
Related concepts
- Spring Bootused by · Spring Boot is an open-source framework in the Spring ecosystem for building stand-alone, production-ready applications with convention-based configuration and auto-configuration.
- integration testconfigures · An integration test evaluates whether multiple software components, or a component and an external dependency, interact and behave correctly together.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

