Add section on Spring MVC TEst vs full integation testing and provide
reference to Spring Boot's @WebIntegrationTest as an alternative.
Issue: SPR-13169
@ -3698,6 +3698,15 @@ __Spring MVC Test__ also provides client-side support for testing code that uses
@@ -3698,6 +3698,15 @@ __Spring MVC Test__ also provides client-side support for testing code that uses
the `RestTemplate`. Client-side tests mock the server responses and also do not
require a running server.
[TIP]
====
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 the
@ -3717,7 +3726,8 @@ __Spring MVC Test__ builds on the familiar "mock" implementations of the Servlet
@@ -3717,7 +3726,8 @@ __Spring MVC Test__ builds on the familiar "mock" implementations of the Servlet
available in the `spring-test` module. This allows performing requests and generating
responses without the need for running in a Servlet container. For the most part
everything should work as it does at runtime with a few notable exceptions as
explained further below. Here is an example of using Spring MVC Test:
explained in <<spring-mvc-test-vs-end-to-end-integration-tests>>.
Here is an example of using Spring MVC Test:
[source,java,indent=0]
----
@ -4074,6 +4084,52 @@ When setting up a `MockMvc`, you can register one or more `Filter` instances:
@@ -4074,6 +4084,52 @@ When setting up a `MockMvc`, you can register one or more `Filter` instances:
Registered filters will be invoked through `MockFilterChain` from `spring-test` and the
last filter will delegates to the `DispatcherServlet`.