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.
ExchangeResultsub-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 aMockMvcrather than making actual requests over HTTP.The main class for testing Spring MVC applications viaWebTestClientwithMockMvcfor server request handling.Specification for configuringMockMvcto test one or more controllers directly, and a simple facade aroundStandaloneMockMvcBuilder.Base specification for configuringMockMvc, and a simple facade aroundConfigurableMockMvcBuilder.Specification for configuringMockMvcto test one or more router functions directly, and a simple facade aroundRouterFunctionMockMvcBuilder.Client for testing web servers that usesRestClientinternally 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 underlyingRestClientviaRestClient.Builder.Extension ofRestTestClient.Builderfor 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.Builderfor tests against а RouterFunction MockMvc setup.Extension ofRestTestClient.Builderfor tests against а standalone MockMvc setup.RestTestClient.UriSpec<S extends RestTestClient.RequestHeadersSpec<?>>Specification for providing the URI of a request.Extension ofRestTestClient.Builderfor tests against а WebAppContext MockMvc setup.Assertions on the response status.XPath assertions for theRestTestClient.