Skip to content

Support HTTP Interface Clients in Test Framework #36674

@ZIRAKrezovic

Description

@ZIRAKrezovic

From: https://docs.spring.io/spring-framework/reference/integration/rest-clients.html#rest-http-service-client

[start quote]

On the server side, an @Controller class can implement the same interface to handle requests with @HttpExchange controller methods.

[end quote]

At the moment, there are WebTestClient and RestTestClient for REST Testing. However, it may be beneficial to use HTTP Interface clients for testing where WebTestClient and RestTestClient assertions are not needed.

At the moment, I see no way to instantiate HTTP Interface Clients and bind them to test Web Server in conjunction with SpringBootTest.WebEnvironment.RANDOM_PORT.

Would you be interested in providing any kind of support for using HTTP Interface Clients within Test Context?

At least consider providing HttpExchangeAdapter for WebTestClient and RestTestClient.

Thanks in advance.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: waiting-for-internal-feedbackAn issue that needs input from a member or another Spring Teamstatus: waiting-for-triageAn issue we've not yet triaged or decided on

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions