Which of the following is true regarding the @SpringBootTest annotation when testing Spring Boot applications?

  • It is used exclusively for unit testing individual components.
  • It loads the entire Spring application context, enabling comprehensive integration testing.
  • It only loads a specific set of predefined components.
  • It requires a separate test configuration file.
The @SpringBootTest annotation is used for integration testing in Spring Boot. It loads the entire Spring application context, allowing you to test the interaction of various components in your application. It's suitable for end-to-end testing.
Add your answer
Loading...

Leave a comment

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