Forum Discussion
SmartBear_Suppo
11 years agoSmartBear Alumni (Retired)
For this functionality you would have to leverage a script assertion: http://www.soapui.org/Functional-Testin ... _Assertion
Typically in XML response you can select all of these elements with the right XPATH expression (http://www.soapui.org/Functional-Testin ... tions.html) and loop through all the nodes asserting false if the caption does not exist (http://www.soapui.org/Functional-Testin ... t-teststep)
In case of JSON there is a conversion to XML that then lets you leverage XPATH. But also a lot of people use the JSONSlurper library to past and loop through JSON: http://groovy.codehaus.org/gapi/groovy/ ... urper.html
Regards,
Michael Giller
SmartBear Software
Typically in XML response you can select all of these elements with the right XPATH expression (http://www.soapui.org/Functional-Testin ... tions.html) and loop through all the nodes asserting false if the caption does not exist (http://www.soapui.org/Functional-Testin ... t-teststep)
In case of JSON there is a conversion to XML that then lets you leverage XPATH. But also a lot of people use the JSONSlurper library to past and loop through JSON: http://groovy.codehaus.org/gapi/groovy/ ... urper.html
Regards,
Michael Giller
SmartBear Software
Related Content
Recent Discussions
- 17 hours agoLukaszK