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
Clarify documentation on use of @AutoConfigureRestDocs with WebTestClient #15977
Comments
My understanding is that you can only use Given a choice between testing an MVC app using @jnizet Does my understanding of the situation match yours? Is your preference to use |
Sure, sorry for the noise. I'm not very experienced with WebFlux, and missed the WebFluxTest annotation. So I had the feeling that WebTestClient was always used to create integration tests with an embedded server and HTTP, and thus that using MVC or WebFlux wouldn't make a difference. Now I'm starting to realize that the AutoConfigureRestDocs annotation is usable
To answer your final question: no, my preference is to use sliced tests, using MockMvc, to test and document my MVC apps. |
Thanks. Let's use this issue to improve the documentation. It sounds like we need to make it clearer when |
In Spring Boot 2.1.3, the
RestDocsWebTestClientConfiguration
class is annotated with@ConditionalOnWebApplication(type = Type.REACTIVE)
.This, as far as I understand, prevents the usage of an autoconfigured WebTestClient to document an MVC app, which is strange since you can use WebTestClient to test an MVC app.
The text was updated successfully, but these errors were encountered: