> For the complete documentation index, see [llms.txt](https://docs.flydean.com/spring-framework-documentation5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flydean.com/spring-framework-documentation5/webreactive/4.testing.md).

# 4.测试

Spring测试模块提供ServerHttpRequest，ServerHttpResponse和ServerWebExchange的模拟实现。 有关模拟对象的讨论，请参见Spring Web Reactive。

WebTestClient建立在这些模拟请求和响应对象的基础上，以提供对测试不使用HTTP服务器的WebFlux应用程序的支持。 您也可以将WebTestClient用于端到端集成测试。
