Jmeter/Groovy: 在不引用 Beanshell 的情况下获取迭代次数
Jmeter/Groovy: getting iteration number without reference to Beanshell
基本上 this 在稍微(但有意义!)不同的上下文中。在 jMeter 中的 Groovy 脚本中 运行 (这些是我目前拥有的所有详细信息),我需要功能来告诉脚本它当前正在进行的测试迭代。
有2个选项:
- 使用
vars.getIteration()
函数
- 因为 JMeter 4.0 you can also get current Thread Group iteration as
${__jm__Thread Group__idx}
. From the Groovy script it would be vars.get('__jm__Thread Group__idx
)`
基本上 this 在稍微(但有意义!)不同的上下文中。在 jMeter 中的 Groovy 脚本中 运行 (这些是我目前拥有的所有详细信息),我需要功能来告诉脚本它当前正在进行的测试迭代。
有2个选项:
- 使用
vars.getIteration()
函数 - 因为 JMeter 4.0 you can also get current Thread Group iteration as
${__jm__Thread Group__idx}
. From the Groovy script it would bevars.get('__jm__Thread Group__idx
)`