| Package | Description |
|---|---|
| org.springframework.test.web.reactive.server |
Support for testing Spring WebFlux server endpoints via
WebTestClient. |
| Modifier and Type | Method and Description |
|---|---|
WebTestClient.Builder |
WebTestClient.Builder.baseUrl(String baseUrl)
Configure a base URI as described in
WebClient.create(String). |
static WebTestClient.Builder |
WebTestClient.bindToHttpHandler(org.springframework.http.server.reactive.HttpHandler httpHandler)
Integration testing without a server targeting the given HttpHandler.
|
static WebTestClient.Builder |
WebTestClient.bindToServer()
Complete end-to-end integration tests with actual requests to a running server.
|
WebTestClient.Builder |
WebTestClient.MockServerSpec.configureClient()
Proceed to configure and build the test client.
|
WebTestClient.Builder |
WebTestClient.Builder.defaultCookie(String cookieName,
String... cookieValues)
Add the given header to all requests that haven't added it.
|
WebTestClient.Builder |
WebTestClient.Builder.defaultHeader(String headerName,
String... headerValues)
Add the given header to all requests that haven't added it.
|
WebTestClient.Builder |
WebTestClient.Builder.exchangeStrategies(org.springframework.web.reactive.function.client.ExchangeStrategies strategies)
Configure the
ExchangeStrategies to use. |
WebTestClient.Builder |
WebTestClient.Builder.responseTimeout(Duration timeout)
Max amount of time to wait for responses.
|
WebTestClient.Builder |
WebTestClient.Builder.uriBuilderFactory(org.springframework.web.util.UriBuilderFactory uriBuilderFactory)
Provide a pre-configured
UriBuilderFactory instance as an
alternative to and effectively overriding baseUrl(String). |