Reactive WebTestClient
Similar to WebClient, Spring WebFlux provides you with a non-blocking, reactive client named WebTestClient, to test your reactive APIs on your server. It has utilities that make testing these APIs easily in a test environment setup. WebTestClient can connect to any of the servers, as detailed earlier over an HTTP connection and execute necessary tests. However, the client has the capability of running the tests with and without a running server.
WebTestClient also has a number of utilities to verify the response produced by executing these server side APIs. It can quite easily bind itself to the WebFlux web application and mock necessary request and response objects to ascertain the API's functional aspects. WebTestClient ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access