提交 b343e73e 编写于 作者: R Rossen Stoyanchev

Add streaming responses to Spring MVC Test section

Closes gh-22544
上级 620a898e
......@@ -5132,6 +5132,20 @@ instances, as the following example shows:
Registered filters are invoked through the `MockFilterChain` from `spring-test`, and the
last filter delegates to the `DispatcherServlet`.
[[spring-mvc-test-vs-streaming-response]]
===== Streaming Responses
There are no options built into Spring MVC Test for container-less testing of streaming
responses. Applications that make use of
<<web.adoc#mvc-ann-async-http-streaming,Spring MVC streaming>> options can use the
<<testing.adoc#webtestclient-stream,WebTestClient>> to perform end-to-end, integration
tests against a running server. This is also supported in Spring Boot where you can
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-testing-spring-boot-applications-testing-with-running-server[test a running server]
with `WebTestClient`. One extra advantage is the ability to use the `StepVerifier` from
project Reactor that allows declaring expectations on a stream of data.
[[spring-mvc-test-vs-end-to-end-integration-tests]]
===== Differences Between Out-of-Container and End-to-End Integration Tests
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册