Skip to content

Improve testing with WebClient #32011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mdeinum opened this issue Jan 11, 2024 · 1 comment
Closed

Improve testing with WebClient #32011

mdeinum opened this issue Jan 11, 2024 · 1 comment
Labels
status: duplicate A duplicate of another issue

Comments

@mdeinum
Copy link
Contributor

mdeinum commented Jan 11, 2024

When we are using a RestTemplate or RestClient we can easily write tests using the MockRestServiceServer and register some behavior. For more complex testing scenarios it is possible to use things like wiremock etc.

For the reactive version of the web there is no equivalent MockRestServiceServer, so when testing the WebClient we would always need something like wiremock or another library or totally mock the dependency.

It would be nice if there would be an equivalent way of of testing WebClient based code like there is for RestTemplate/RestClient.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jan 11, 2024
@snicoll
Copy link
Member

snicoll commented Jan 11, 2024

Duplicate of #19852

@snicoll snicoll marked this as a duplicate of #19852 Jan 11, 2024
@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2024
@snicoll snicoll added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants