When performing integration testing in Spring Boot, which of the following is used to load only specific slices of the application?
- @AutoConfigureMockMvc
- @DataJpaTest
- @SpringBootTest
- @WebMvcTest
The @WebMvcTest annotation is used to load only specific slices of the application, typically focused on testing web controllers and related components in a Spring Boot application.
Loading...
Related Quiz
- Which Spring Cloud component is primarily used for service discovery in a microservices architecture?
- When configuring a CacheManager in Spring Boot, the _____ property can be used to set the TTL values for cache entries.
- How can you handle different HTTP methods in a single method in a Spring Boot controller?
- While monitoring a Spring Boot application, you observe a sudden spike in response times. How would you determine whether the issue is related to the application code, database interactions, or external service calls, and what steps would you take to address it?
- For integration testing in Spring Boot, the _____ annotation is used to specify that only certain parts or layers of the application should be loaded.