Re: Iteration Number in JSR223 Groovy string

2024-04-02 Thread Tong Sun
On Tue, Apr 2, 2024 at 1:51 PM Dmitri T wrote: > I have bad news for you, given you're not capable of understanding what > does "caching would only cache first replacement." phrase means even > with the help of online translation tools and LLM you won't last long in > IT so you should consider

Re: Iteration Number in JSR223 Groovy string

2024-04-02 Thread Dmitri T
Tong Sun wrote: Thanks. So the root cause is: > ensure your script code does not use >     JMeter variables or JMeter function calls directly Having known that, I still don't quite understand why I'm getting zeros. My actual groovy string is: "ThreadGroup: ${__threadNum}, Iteration Number:

Re: Iteration Number in JSR223 Groovy string

2024-04-02 Thread Tong Sun
Thanks. So the root cause is: > ensure your script code does not use > JMeter variables or JMeter function calls directly Having known that, I still don't quite understand why I'm getting zeros. My actual groovy string is: "ThreadGroup: ${__threadNum}, Iteration Number:

Re: Iteration Number in JSR223 Groovy string

2024-04-02 Thread Dmitri T
Tong Sun wrote: JMeter has a built-in variable ${__jm__Thread Group__idx} to retrieve the current iteration, and I want to replace the `Thread Group` using ${__threadGroupName}. So this comes natural to me: "Iteration Number is ${__V(__jm__${__threadGroupName}__idx)}" But when I try it, I

Iteration Number in JSR223 Groovy string

2024-04-02 Thread Tong Sun
JMeter has a built-in variable ${__jm__Thread Group__idx} to retrieve the current iteration, and I want to replace the `Thread Group` using ${__threadGroupName}. So this comes natural to me: "Iteration Number is ${__V(__jm__${__threadGroupName}__idx)}" But when I try it, I always get "0".