Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting values of properties in SoapUI's groovy

I'm pretty new to testing and SoapUI and I've just faced a problem: I have 2 soap requests from which I transfer data (using PropertyTransfer) to Properties - I can do that and it works fine for me. But now I would like to take those values in my groovy script (which is next step of my testcase). How to do that? So far, I have found following:

testRunner.testCase.getPropertyValue("SomeProp")

But it doesn't work for me. I guess it's not that Properties. Any tips?

like image 910
Pijotrek Avatar asked Dec 06 '22 00:12

Pijotrek


1 Answers

In the Groovy script panel you can right-click and select Get Data, to help you out. You will end up with something like this:

context.expand( '${Properties step#SomeProp}' )

Same thing can also be written as:

testRunner.testCase.testSteps['Properties step'].getPropertyValue("SomeProp")
like image 124
SiKing Avatar answered Mar 12 '23 07:03

SiKing