janjan
14 years agoNew Contributor
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 receive 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?
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.
Maybe it is impossible. How should I solve my problem?
How can I create two or more loops in the groovy script? For now I receive 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?
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.
Maybe it is impossible. How should I solve my problem?