Forum Discussion
Thanks for this Radford. A couple of things:
1) I need the code to dynamically take its input from a JDBC response as this code will need to run 100 times for our test requirements so I need to parse the JDBC response as XML dynamically.
2) Once I have extracted that data from the JDBC response, can I populate this data into a single test case property so that I can inject it into a SOAP request?
Regards,
Ajay
To get the results from the JDBC step I would just use the point and click Get Data functionality. Just right click in the groovy script, select the Get Data item, and select your desired data.
As for setting properties via Groovy script. See the following link for examples:
https://support.smartbear.com/readyapi/docs/testing/scripts/samples/variable.html
But in short, you will see that the test suites, cases and steps all have a setPropertyValue method, so from a Groovy script test step you'll write something like:
context.getTestCase().getTestStepByName('StepName').setPropertyValue( 'PropName', 'Value' )