Package org.springframework.test.web.servlet.client
@NullMarked
package org.springframework.test.web.servlet.client
Support for testing Spring MVC applications via
RestTestClient
with
MockMvc
for server request handling.-
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 throughRestTestClient
.Assertions on headers of the response.JsonPath assertions.Connector that handles requests by invoking aMockMvc
rather than making actual requests over HTTP.The main class for testing Spring MVC applications viaWebTestClient
withMockMvc
for server request handling.Specification for configuringMockMvc
to test one or more controllers directly, and a simple facade aroundStandaloneMockMvcBuilder
.Base specification for configuringMockMvc
, and a simple facade aroundConfigurableMockMvcBuilder
.Specification for configuringMockMvc
to test one or more router functions directly, and a simple facade aroundRouterFunctionMockMvcBuilder
.Client for testing web servers that usesRestClient
internally to perform requests while also providing a fluent API to verify responses.Spec for expectations on the response body content.Spec for expectations on the response body decoded to a single Object.RestTestClient.Builder<B extends RestTestClient.Builder<B>>Steps to customize the underlyingRestClient
viaRestClient.Builder
.Extension ofRestTestClient.Builder
for tests against a MockMvc server.Specification for providing the 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.Extension ofRestTestClient.Builder
for tests against а RouterFunction MockMvc setup.Extension ofRestTestClient.Builder
for tests against а standalone MockMvc setup.RestTestClient.UriSpec<S extends RestTestClient.RequestHeadersSpec<?>>Specification for providing the URI of a request.Extension ofRestTestClient.Builder
for tests against а WebAppContext MockMvc setup.Assertions on the response status.XPath assertions for theRestTestClient
.