I wonder if there is a way to assert that XML response does NOT contain any other tags than those expected? I am using plain http requests (no WSDL, schema validation, not SOAP, not REST) and the application protocol is custom for a particular application (POS systems).
I was thinking (and started) of creating a custom SOAPUI library with script that contains:
- a reference table
- a function that checks if returned tag is on the list (in reference table)
- if the returned tag is not on the list, then assertion fails
So, my question is: is there a better way to validate that? The response XMLs have a lot of fields, some mandatory, some optional and some conditional depending on other (within same request).