Package org.springframework.test.web.reactive.server
@NullMarked
package org.springframework.test.web.reactive.server
Support for testing Spring WebFlux server endpoints via
WebTestClient
.-
ClassDescriptionAssertions on cookies of the response.
ExchangeResult
sub-class that exposes the response body fully extracted to a representation of type<T>
.Container for request and response details for exchanges performed throughWebTestClient
.ExchangeResult
variant with the response body decoded asFlux<T>
but not yet consumed.Assertions on headers of the response.Connector that handles requests by invoking anHttpHandler
rather than making actual requests to a network socket.Indicates that an error occurred after the server response was completed, viaReactiveHttpOutputMessage.writeWith(org.reactivestreams.Publisher<? extends org.springframework.core.io.buffer.DataBuffer>)
orReactiveHttpOutputMessage.setComplete()
, and can no longer be changed.JsonPath assertions.SimpleClientHttpResponse
extension that also exposes a result object from the underlying mock server exchange for further assertions on the state of the server response after the request is performed.Contract that frameworks or applications can use to pre-package a set of customizations to aWebTestClient.MockServerSpec
and expose that as a shortcut.Assertions on the response status.Client for testing web servers that usesWebClient
internally to perform requests while also providing a fluent API to verify responses.Spec for expectations on the response body content.WebTestClient.BodySpec<B,S extends WebTestClient.BodySpec<B, S>> Spec for expectations on the response body decoded to a single Object.Steps for customizing theWebClient
used to test with, internally delegating to aWebClient.Builder
.Specification for customizing controller configuration equivalent to, and internally delegating to, aWebFluxConfigurer
.Spec for expectations on the response body decoded to a List.WebTestClient.MockServerSpec<B extends WebTestClient.MockServerSpec<B>>Base specification for setting up tests without a server.Specification for providing body of a request.Specification for providing the body and the URI of a request.Specification for adding request headers and performing an exchange.Specification for providing request headers and the URI of a request.Chained API for applying assertions to a response.Specification for customizing router function configuration.WebTestClient.UriSpec<S extends WebTestClient.RequestHeadersSpec<?>>Specification for providing the URI of a request.Contract to encapsulate customizations to aWebTestClient.Builder
.XPath assertions for theWebTestClient
.