performancetestingjmeterjmeter-5.0

How to display actual loop count in JMeter


We can display the actual thread by: ${__threadNum}

Is there something similar for the actual loop count?

loop count value


Solution

  • You can use ${__jm__Thread Group__idx} to get current loop iteration

    ${__jm__Thread Group__idx}
    

    Notice this is part of a general enhancement in JMeter 5 for exposing the loop count

    While Controller now exports a variable containing its current index named __jm__<Name of your element>__idx. So for example, if your While Controller is named WC, then you can access the looping index through ${__jm__WC__idx}