Add WebTestClient to Web Servlet section
This commit is contained in:
parent
2b68212c20
commit
6f73b8b200
|
@ -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.
|
||||
====
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ include::web/webflux-websocket.adoc[leveloffset=+1]
|
|||
|
||||
[[webflux-test]]
|
||||
== Testing
|
||||
[.small]#<<web.adoc#testing,Same in Spring MVC>>#
|
||||
|
||||
The `spring-test` module provides mock implementations of `ServerHttpRequest`,
|
||||
`ServerHttpResponse`, and `ServerWebExchange`.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[[testing]]
|
||||
= Testing
|
||||
[.small]#<<web-reactive.adoc#webflux-test,Same in Spring WebFlux>>#
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
|||
`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.
|
||||
|
|
Loading…
Reference in New Issue