Forum Discussion
Hey, I'll try to give as many details as I can.
My DataSource is an Excel file. Its purpose is to basically have a payload adjustment for each test case.
Those payloads are then injected into requests.
So the flow structure is:
DataSource
Request X (REST)
Request Y (REST)
DataSink
DataLoop
The DataSink writes requests X&Y IDs responses into the same Excel file.
I need that for each request X response ID there will be a Y response ID (as I described in the table of the original message).
All is fine when I require the loop to go over the entire flow again & again until the DataSource ends.
What I'm missing is setting the loop to run a defined amount of times (while loop), then I could use it 5 times for request X as a nested loop, and a 'big' loop for the entire flow.
Thanks a lot!
Isaac.
Hi Isaac,
If you are looking for a groovy script to read an Excel file, please refer to the following topics:
https://community.smartbear.com/t5/SoapUI-Pro/Get-xls-data-in-loop-in-groovy-script/td-p/27864
https://community.smartbear.com/t5/SoapUI-Open-Source/HOW-TO-READ-EXCEL-FILE-IN-GROOVY/td-p/178242
https://stackoverflow.com/questions/22031375/reading-excel-and-writing-to-xml-in-groovy-for-soapui
Also, I recommend that you read the following doc articles:
https://support.smartbear.com/readyapi/docs/testing/scripts/samples/index.html
Related Content
- 5 years ago