To perform unit testing on the web layer of a Spring Boot application without loading the complete context, use the _____ annotation.

  • @SpringBootTest
  • @UnitTest
  • @WebLayerTest
  • @WebMvcTest
To perform unit testing on the web layer of a Spring Boot application without loading the complete context, you should use the @WebMvcTest annotation. This annotation focuses only on the web layer and is suitable for testing controllers.
Add your answer
Loading...

Leave a comment

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