I have a ForEach controller in JMeter.
How can I access counter of a loop inside this controller (through variable) and then use it for creating new variables?
One good way to do this is to define a counter inside the loop controller. Example, if you want a loop with 20 iterations, you put 20 in the loop controller and in the counter you put from 0 - 19. In the counter you can also define an increment. The output variable is named in the Reference Name field.
ForEach Controller. As the name suggests the ForEach Controller iterates over an array of values. Let's look at the controller. This controller is supplied an array of values and then the array is iterated until completed.
Put Counter configuration element inside ForEach Controller and check attributes "Track Counter Independently for each User" and "Reset counter on each Thread Group Iteration"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With