In SoapUI 5.2.1 I am trying to apply assertions within my Mock Dispatch Groovy Script to compare that the XML received by the mock, matches my expected xml. I have seen references to using XMLUnit to achieve this. Does anyone have a full groovy script including:
- Import of required libraries
- Accessing the xml payload in a format that XMLUnit can understand
- Creating an expected xml payload that the request payload will be compared with
- Comparing the xml payloads in an xml aware manner, presumably using XMLUnit
- Generating the assertion failures or taking some other action
There are some other questions around this area, but all appear incomplete to me.
Thanks, Matt.