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' )
- Olga_T7 years ago
Alumni
Hi everyone,
Radford thank you for sharing your solution and the instructions!
del_exaclee did you manage to accomplish your task? If your question was answered, do you mind accepting Radford's reply as a Solution? This will help other users find the reply easier in the future.
Otherwise, feel free to provide us with updates on the issue.
Thank you in advance,
- del_exaclee7 years agoNew Contributor
Unfortunately Groovy didnt work for us, so we had to code the XML using SQL within in the JDBC request.
Once we had the XML we wanted, we then injected that as a child node within the main SOAP request.