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
xml placeholder is not ignoring child nodes present under parent node. #250
Comments
The placeholder DSL currently applies to nested text content and to attributes values only. It would certainly be possible to also apply to other structures but the API and likely the DSL needs to be adjusted. For you use case I can envison adding an extra namespace with attributes like
or something like this. This is a non-trivial change and it may break backwards compatibility - which I personally can live with given that we still label the module as experimental. I'll add the "help wanted" label here as this feature will sure be implemented faster if if doesn't need to wait for me. |
Thanks. But how this can be validated after implementation, I hope wiremock people can use it to create standalone jar even marked under experimental. |
I don't know anything about the build process used by the wiremock people. It most probably will work about this way: somebody implements the needed enhancement here, I will create a new XMLUnit release, the wiremock team decides they want to upgrade the version of XMLUnit they use and do so and then they create a new version of wiremock with the updated dependency. It may be possible to update XMLUnit without upgrading wiremock in your setup, but I wouldn't know how. Realistically "somebody implements the needed enhancement here" likely takes the longest time of the steps I outlined. |
Thanks. This will be helpful. I will track wiremock changes via wiremock issue once xmlunit is available with changes. |
Hi, |
It is somewhere on my TODO list, but that tends to grow rather than shrink :-) Like I said "this feature will sure be implemented faster if if doesn't need to wait for me". I can't realistically promise any timeline. |
This issue we faced while API Test Automation design. In our web service testing we trigger the API request (north bound) and checks the downstream request formed by application code. We use mocked backend using wiremock. Wiremock has capability equalToXml which support the matching of incoming request and expected request and thus test is validated.
Issue is while xml comparison using ${xmlunit.ignore} placeholder we are able to ignore the values from single node but not able to ignore anything entirely present under a particular node if that node has child nodes.
This would help in xml comparisons when some part in request is unknown or under development or its dynamic and of no interest for comparison etc. Issues was raised on wiremock project #1741 but later found that wiremock is using xmlunit as dependency.
Example:
The text was updated successfully, but these errors were encountered: