Jmeter Current Thread Number?

Viewed 60456

I am using a Thread Group with Number Of Threads = 5 with an HTTP request.

In the request I want to include a parameter with the value of the thread number, e.g.,

"pageno": ${threadno}

I want to get the thread number like ${threadno}.

How can I do that?

4 Answers

For those looking for the number of active threads in the entire test plan, not just a particular ThreadGroup.

${__groovy(org.apache.jmeter.threads.JMeterContextService.getNumberOfThreads())}
Related