@ -8,9 +8,10 @@ to any server over an HTTP connection. It can also bind directly to WebFlux appl
@@ -8,9 +8,10 @@ to any server over an HTTP connection. It can also bind directly to WebFlux appl
with <<testing.adoc#mock-objects-web-reactive,mock request and response>> objects,
without the need for an HTTP server.
[NOTE]
[TIP]
====
`WebTestClient` is not usable yet in Kotlin, see <<languages.adoc#kotlin-webtestclient-issue, this section>> for more details.
Kotlin users, please see <<languages.adoc#kotlin-webtestclient-issue,this section>> for
important information on using the `WebTestClient` in Kotlin.
[.small]#<<web-reactive.adoc#webflux-test,Same in Spring WebFlux>>#
@ -26,11 +27,12 @@ See <<testing.adoc#testcontext-framework,TestContext Framework>> for more detail
@@ -26,11 +27,12 @@ See <<testing.adoc#testcontext-framework,TestContext Framework>> for more detail
[[testing-mockmvc]]
== Spring MVC Tests
== Spring MVC Test (MockMvc)
`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 <<testing.adoc#spring-mvc-test-framework,Spring MVC Test>> for more details.
`spring-test` provides a framework for testing annotated controllers through the
`DispatcherServlet`, i.e. supporting annotations and complete with Spring MVC
infrastructure, but without an HTTP server.
See <<testing.adoc#spring-mvc-test-framework,Spring MVC Test>> for more details.
@ -41,3 +43,13 @@ HTTP server. See <<testing.adoc#spring-mvc-test-framework,Spring MVC Test>> for
@@ -41,3 +43,13 @@ HTTP server. See <<testing.adoc#spring-mvc-test-framework,Spring MVC Test>> for
`spring-test` provides a `MockRestServiceServer` that can be used as a mock server for
testing client-side code that internally uses the `RestTemplate`.
See <<testing.adoc#spring-mvc-test-client,Client REST Tests>> for more details.
[[testing-webtestclient]]
== WebTestClient
`spring-test` provides a dedicated `WebTestClient` for end-to-end integration testing.
`WebTestClient` can connect to any server over an HTTP connection. It is non-blocking,
reactive client and well suited for testing asynchronous and streaming scenarios.