spring-projects / spring-projects/spring-framework
Support HTTP Interface Clients in Test Framework
@rstoyanchev is already working on this.
Since Jun 4, 2026.
- Dominant language
- Java
- Stars
- 60.2k
- Forks
- 38.8k
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 27
Description
[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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.