Jmeter Current Thread Number?

后端 未结 4 1239
耶瑟儿~
耶瑟儿~ 2021-02-06 23:24

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.,

<
4条回答
  •  隐瞒了意图╮
    2021-02-07 00:22

    ${__threadNum} does not work well alone.

    You will need use ${__eval(${__threadNum})}. Try to use this:

    int threadNum=ctx.getThreadGroup().getNumThreads(); 
    

    ctx is from JmeterContext

提交回复
热议问题