CARQUESTTechnol
15 years agoContributor
[Res]2 DS Loops and running requests with the prev response
I currently have the following test steps:
DataSource1
DataSource2
TestRequest1
Conditional Goto
Groovy Script
(disable) TestRequest2
DataSource Loop2
DataSource Loop1
I want to run for each value in Datasource1 all the values in Datasource2 for the TestRequest1 request. If the TestRequest1 request returns a specific response (empty result set) then I want to skip to the DataSource Loop2 to get the next value in the list.
If there is a response for TestRequest1 is valid then I want to execute the Groovy Script which will take all the values from the response of TestRequest1 and update the request for TestRequest2. The groovy script will then run TestRequest2.
The problem that I am having is that I only loop through DataSource2 once and never get through DataSource1. I have both datasources to start at 0. I have my Conditional Goto to go to DataSource Loop2 if the response is empty. I disabled TestRequest2 because I didn't want it to run when the test step is encountered outside of the groovy script.
Is there a better way to do this? Am I missing something?
DataSource1
DataSource2
TestRequest1
Conditional Goto
Groovy Script
(disable) TestRequest2
DataSource Loop2
DataSource Loop1
I want to run for each value in Datasource1 all the values in Datasource2 for the TestRequest1 request. If the TestRequest1 request returns a specific response (empty result set) then I want to skip to the DataSource Loop2 to get the next value in the list.
If there is a response for TestRequest1 is valid then I want to execute the Groovy Script which will take all the values from the response of TestRequest1 and update the request for TestRequest2. The groovy script will then run TestRequest2.
The problem that I am having is that I only loop through DataSource2 once and never get through DataSource1. I have both datasources to start at 0. I have my Conditional Goto to go to DataSource Loop2 if the response is empty. I disabled TestRequest2 because I didn't want it to run when the test step is encountered outside of the groovy script.
Is there a better way to do this? Am I missing something?