performance - JMeter - How to loop through "bsh.shared" ArrayList in a single Thread Group? -
i have beanshell postprocessor under setup thread group. put arraylist "bsh.shared" namespace like:
list personidslist = new arraylist(); ... bsh.shared.personids = personidslist;
i know how read value via __beanshell function as:
${__beanshell(bsh.shared.personids)}
and want loop through array in other thread group. (${personid} - should iterating value list)
could you, please, tell me how that?
thanks!
the easiest way using while controller counter test element like:
add while controller 2nd thread group , put following expression "condition" area:
${__beanshell(integer.parseint(vars.get("counter")) < bsh.shared.personids.size()-1,)}
add counter child of while controller , configure follows:
- start:
0
- increment:
1
- maximum:
${__beanshell(bsh.shared.personids.size()-1,)}
- reference name:
counter
- start:
- refer "current' person id
${__beanshell(bsh.shared.personids.get(integer.parseint(vars.get("counter"))),)}
required
Comments
Post a Comment