Forum Discussion
- Hello,
In the "datasource" dropdown, there is an option for groovy that will let you do this, If you need to combine grid and groovy, I suggest you have an extra datasource step. Let me know if you have further questions. - itaykaldiContributorit was more useful if i could do the loop in Groovy because i need to parse manual the response JSON (via JsonSlurper, SoapUI can't convert to XML).
So every row i want to assert from the grid i need to parse the same JSON response again. - Hi,
You can definitely do that with groovy script.
I don't have a sample script, but please have a look at our API http://www.soapui.org/apidocs/pro/com/e ... ource.html
Regards,
Shadid
SmartBear Sweden.- MadhusmitaOccasional Visitor
i tried to iterate the datasource in groovy script but always print last value.i want to get all the value of all the rows.how to reset the datsource to load from first rows value.
- canpan14Occasional Contributor
Way late on this but you can reset the datasource to load from the first value by doing the following:
testRunner.testCase.getTestStepByName('DataSource').repositionAtStartRow( testRunner, context)
Taken from here: