spring-framework/framework-docs/modules/ROOT/pages/web/webflux-webclient/client-testing.adoc

12 lines
581 B
Plaintext
Raw Normal View History

2023-04-19 23:26:16 +08:00
[[webflux-client-testing]]
= Testing
:page-section-summary-toc: 1
2023-04-19 23:26:16 +08:00
To test code that uses the `WebClient`, you can use a mock web server, such as the
https://github.com/square/okhttp#mockwebserver[OkHttp MockWebServer]. To see an example
of its use, check out
{spring-framework-code}/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java[`WebClientIntegrationTests`]
2023-04-19 23:26:16 +08:00
in the Spring Framework test suite or the
https://github.com/square/okhttp/tree/master/samples/static-server[`static-server`]
sample in the OkHttp repository.