Forum Discussion

NamrataMane's avatar
NamrataMane
Occasional Contributor
8 years ago

Nested loop in groovy to run the test case

Hello All, 

 

I am having difficulty in using nested loops in groovy for running the below scenario:

 

API call : http://[host]/variable1/varaible2

 

Test Data: Variable 1-

V1 

V2

V3

 

Variable 2- 

E1

E2

E3

E4

 

I need to call the API for all values in Variable 1 with all values in Variable 2. 

 

how can i do this in groovy script because this API call is another test case and I need to run the test case using groovy script testrunner method.

 

Please help!!

 

2 Replies

    • nmrao's avatar
      nmrao
      Icon for Champion Level 1 rankChampion Level 1
      Can you show the test case structure (with different test steps along with their type)? May be explain with an image if possible.