in Service Discovery by
Where is the WebMVC Test Annotation used?

▼ Show 1 Answer

0 votes

WebMvcTest Annotation is used for unit testing Spring MVC Applications, where the test objective is to focus on Spring MVC Components. 

Ex: @WebMvcTest(value = ToTestController.class, secure = false)

In the above example, the intention is to launch the ToTestController. All other controllers and mappings will not be launched when this unit test is executed.

Learn More with Madanswer