Forum Discussion

janjan's avatar
janjan
New Contributor
13 years ago

Two or more loops in the groovy script

Hello, I am new in soapUI therefore I need Your help.
How can I create two or more loops in the groovy script? For now I recive from test response a tree with a three main branches. Every main branches consist of twenty smaller branches with different information. I would like rewrite it to the file. For now I use context.loopindex and I would like to have two or more variables but when I declare new variable in the groovy script then in the loop the value of variable is reseted. The quantity of main and smaller branches can be change always when I start a new request. Could you any ideas?

I would like to add next question:

If I have a three counters in the groovy script how I should return the value of counters. Now I use "result" for one counter.