JMeter - loop controller with variable loop count

Viewed 41891

I am using JMeter and I want to define one loop controller. In this loop I want to define the loop count with a Jmeter variable. Is this posible?

Thanks a lot

3 Answers

You can use the following inside the "Loop Count" field:

${myVar}

e.g. for a random count:

${__groovy(java.util.concurrent.ThreadLocalRandom.current().nextLong(128L),)}

You can access the current loop index (starts at 0) via ${__jm__Loop Controller__idx} where Loop Controller is the name of your loop.

Related