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
Add @WebServiceClientTest annotation that can be used when testing SOAP clients #17274
Conversation
a717fad
to
80157a1
Compare
@nosan This looks like a really nice addition to the existing test slice support and would be great to add it in 2.2.x. The one things we're not totally sure about is the
@gregturn Can probably help answer that. I'd certainly like to keep a clean separation and have the general use Mock code in spring-ws and keep the Boot code specific to our slice concepts. |
Thank you @philwebb, If adding support for a slice |
@nosan I totally agree, we'll really need some upstream changes I think. |
1c8f362
to
444e273
Compare
@gregturn can you please review the discussion above? As currently proposed, there's quite a bit of reflection when interacting with Spring Web Services which we'd like to avoid. |
I don't see why we can't alter the visibility of I opened https://jira.spring.io/browse/SWS-1085. |
You can test out these changes using |
If @nosan wishes to retool the PR using these modifications, so be it. |
Thanks for your feedback and changes, @gregturn I checked Could you please add the following changes?
'reset' just clears Ideally, this class should be removed. Thanks in advance |
I can extend the surface API to support a |
@gregturn In the proposed changes, |
@nosan Okay, the additional changes you requested have been applied. Again, check the latest snapshots and see if they are suitable. |
444e273
to
27fcfca
Compare
when testing SOAP clients
27fcfca
to
704a2a7
Compare
Thanks @gregturn PR has been updated |
Spring WS |
Add `@WebServiceClientTest` and related test auto-configuration to allow slice testing of Spring Web Service client applications. See spring-projectsgh-17274
Add `@WebServiceClientTest` and related test auto-configuration to allow slice testing of Spring Web Service client applications. See gh-17274
Re-opening to address the CI failures on JDK 11 and 14. |
Thanks a lot! 👍 |
SOAP
clients.
Add a slice
@WebServiceClientTest
annotation that can be used when testingSOAP
clients.The implementation is quite similar to
@RestClientTest
but forWebServiceTemplateBuilder
.PR is not ready yet, it is just a concept of how it could be.
Here is a small example of usage:
If you are interested in this feature I will add more tests and documentation.
Also, pay attention to https://github.com/spring-projects/spring-boot/compare/master...nosan:webservice-client-test?expand=1#diff-a0ae2b770ccb1b5cc0b45d9966df843aR66 it would be nice to have
reset()
functionality inMockWebServiceServer
class. Is it possible to add?Let me know what you think and thanks in advance.
P.S. Work-in-Progress