The_Spring MVC Test framework_provides first class support for testing Spring MVC code using a fluent API that can be used with JUnit, TestNG, or any other testing framework. It’s built on theServlet API mock objectsfrom thespring-testmodule and hence does_not_use a running Servlet container. It uses theDispatcherServletto provide full Spring MVC runtime behavior and provides support for loading actual Spring configuration with the_TestContext framework_in addition to a standalone mode in which controllers may be instantiated manually and tested one at a time.
_Spring MVC Test_also provides client-side support for testing code that uses theRestTemplate. Client-side tests mock the server responses and also do_not_use a running server.
![]()  | 
|---|
| Spring Boot provides an option to write full, end-to-end integration tests that include a running server. If this is your goal please have a look at theSpring Boot reference page. For more information on the differences between out-of-container and end-to-end integration tests, seethe section called “Differences between Out-of-Container and End-to-End Integration Tests”. | 
![\[Tip\]](http://docs.spring.io/spring/docs/5.0.0.M5/spring-framework-reference/html/images/tip.png.pagespeed.ce.w22Wv-tZ37.png)