Forum Discussion
AutUser
15 years agoOccasional Contributor
You could try using groovyutils and xpath.
http://www.soapui.org/userguide/functio ... ystep.html
Hello,
Regarding this topic of "Property Transfer based on a particular value", considering the example given a reply up above, it says:
>> For example,
>> def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context);
>> def holder = groovyUtils.getXmlHolder( "YOUR RESPONSE" );
>> def nodeValueStringArray = holder.getNodeValues("/GetMyResult/MyResult
>> [ResultSource='ProductionSource']/ResultKey");
>> Loop through nodeValueStringArray and get your values for ResultKey.
I'm new to SoapUI and need to evaluate some requirements as part of our Web Services Automation tool. I need something similar: on the following response:
My Vehicle Year List
http://x.y.z.w:3000/v1/years/
2006
1000
2005
1001
2004
1002
OK
I need to find for the ServerItemId associated to year 2004 and pass it over
as a property value in a subsequent test script.
So need to loop thru the response (how do I do it?), search for Text 2004
and return, via groovy, the value of the corresponding ServerItemId: 1002
Can anyone help me please? or provide me with a link where I can find out
more about how to do this, I'd really appreciate it
Best regards and thanks in advance,
Igor
http://www.soapui.org/userguide/functio ... ystep.html
Hello,
Regarding this topic of "Property Transfer based on a particular value", considering the example given a reply up above, it says:
>> For example,
>> def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context);
>> def holder = groovyUtils.getXmlHolder( "YOUR RESPONSE" );
>> def nodeValueStringArray = holder.getNodeValues("/GetMyResult/MyResult
>> [ResultSource='ProductionSource']/ResultKey");
>> Loop through nodeValueStringArray and get your values for ResultKey.
I'm new to SoapUI and need to evaluate some requirements as part of our Web Services Automation tool. I need something similar: on the following response:
I need to find for the ServerItemId associated to year 2004 and pass it over
as a property value in a subsequent test script.
So need to loop thru the response (how do I do it?), search for Text 2004
and return, via groovy, the value of the corresponding ServerItemId: 1002
Can anyone help me please? or provide me with a link where I can find out
more about how to do this, I'd really appreciate it
Best regards and thanks in advance,
Igor
Related Content
Recent Discussions
- 6 days agoemoya