Which annotation is primarily used for writing integration tests in Spring Boot applications?

  • @Autowired
  • @Component
  • @RunWith(SpringRunner.class)
  • @SpringBootTest
The @SpringBootTest annotation is primarily used for writing integration tests in Spring Boot applications. It loads the complete Spring application context, allowing you to perform tests in a real Spring environment.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *