Forum Discussion
SmartBear_Suppo
Alumni
12 years agoHi,
You can create a testcase level property for the node value.
Here is the tips and tricks to get and set properties,
http://www.soapui.org/Scripting-Propert ... properties
And with point and click testing you can capture any value from responseAsXml,
http://www.soapui.org/Working-with-soap ... sting.html
On that request add Script Assertion,
http://www.soapui.org/Functional-Testin ... tions.html
You can refer the Test case property value again using property expansion (Right click > get data > Testcase > Property)
Thanks,
Jeshtha
You can create a testcase level property for the node value.
Here is the tips and tricks to get and set properties,
http://www.soapui.org/Scripting-Propert ... properties
And with point and click testing you can capture any value from responseAsXml,
http://www.soapui.org/Working-with-soap ... sting.html
On that request add Script Assertion,
http://www.soapui.org/Functional-Testin ... tions.html
//Right click > Get Data get the specific node from response,
def value = context.expand( '${REST Test Request#ResponseAsXml#//GeocodeResponse[1]/result[1]/address_component[1]/long_name[1]}' )
//Save it in a testcase property
testRunner.testCase.setPropertyValue( "Testcase_property_name",value )
You can refer the Test case property value again using property expansion (Right click > get data > Testcase > Property)
context.expand( '${#TestCase#testcase_property_name}' )
Thanks,
Jeshtha