We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
OK, got it. Well, getting test step names i pretty simple, however you will need to supply the 0-based index of where the desired step is meaning that if you want to generalize you have to put that particular step at the same index everywhere (btw, test step name is the same as the request name). Here goes:
def testStepName = context.testCase.getTestStepAt(n).getName()
where n is the 0-based index. Now you can simply use testStepName here:
def request_total = context.expand('${' + testStepName + '#response#$[n].totalCount}')
Notice that since testStepName is a variable you have to concat the strings, hence the ' and the + surrounding it.
Well, SoapUI uses Groovy so that API may be useful:
http://docs.groovy-lang.org/latest/html/gapi/
There are also the SoapUI specific libraries:
https://www.soapui.org/apidocs/index.html?overview-summary.html
Other than that I mostly google the problem and read a lot.
Thank you so much
Had to make a few minor changes but this is working for me, now on to clone it to 100s of requests :)
I wonder if you have a link (or suggestion for search terms to plug into google) where I can search more information about the structure of these expression and maybe gain better understanding... I didn't see much in the soapUI documentation
Well, SoapUI uses Groovy so that API may be useful:
http://docs.groovy-lang.org/latest/html/gapi/
There are also the SoapUI specific libraries:
https://www.soapui.org/apidocs/index.html?overview-summary.html
Other than that I mostly google the problem and read a lot.