Skip to content

Latest commit

 

History

History
43 lines (23 loc) · 1.24 KB

webmvc-test.adoc

File metadata and controls

43 lines (23 loc) · 1.24 KB

Testing

Servlet API Mocks

spring-test provides mock implementations of Servlet API contracts for unit testing controllers, filters, and other web components. See Servlet API mock objects for more details.

TestContext Framework

spring-test provides support for loading Spring configuration in JUnit and TestNG tests including efficient caching of the loaded configuration across test methods and support for loading a WebApplicationContext with a MockServletContext. See TestContext Framework for more details.

Spring MVC Tests

spring-test provides an integration test framework for testing annotated controllers through the DispatcherServlet, complete with Spring MVC infrastructure, but without an HTTP server. See Spring MVC Test for more details.

Client-side REST

spring-test provides a MockRestServiceServer that can be used as a mock server for testing client-side code that internally uses the RestTemplate. See Client REST Tests for more details.