Forum Discussion
SmartBear_Suppo
Alumni
12 years agoHi,
You can add assertions using script and once added you can disable the custom groovy event handler,
RequestFilter.filterRequest is the custom event handler
http://www.soapui.org/Scripting-Propert ... dlers.html
Example for Xpath assertion
Here is more information about Assertion API,
http://www.soapui.org/apidocs/com/eviwa ... mmary.html
http://www.soapui.org/apidocs/com/eviwa ... rtion.html
http://www.soapui.org/apidocs/com/eviwa ... rtion.html
Thanks,
Jeshtha
You can add assertions using script and once added you can disable the custom groovy event handler,
RequestFilter.filterRequest is the custom event handler
http://www.soapui.org/Scripting-Propert ... dlers.html
Example for Xpath assertion
def assertion = request.addAssertion("XPath Match")
assertion.path = "declare namespace ns1='http://www.xyz.com/xyz/abc/v1/xyz';\n//ns1:parentnode[1]/ns1:status[1]/ns1:value[1]"
assertion.expectedContent = "true"
Here is more information about Assertion API,
http://www.soapui.org/apidocs/com/eviwa ... mmary.html
http://www.soapui.org/apidocs/com/eviwa ... rtion.html
http://www.soapui.org/apidocs/com/eviwa ... rtion.html
Thanks,
Jeshtha