【问题标题】:Jmeter/Groovy: getting iteration number without reference to BeanshellJmeter/Groovy:在不参考 Beanshell 的情况下获取迭代次数
【发布时间】:2018-08-13 04:14:20
【问题描述】:

基本上this 在稍微(但有意义!)不同的上下文中。在 jMeter 中运行的 Groovy 脚本中(这些是我目前拥有的所有细节),我需要功能来告诉脚本它当前正在进行的测试迭代。

【问题讨论】:

  • 为什么不使用vars.getIteration();?为什么它不是重复的?

标签: performance groovy jmeter performance-testing


【解决方案1】:

有两种选择:

  1. 使用vars.getIteration()函数
  2. 由于JMeter 4.0,您还可以获得当前Thread Group 迭代为${__jm__Thread Group__idx}。在 Groovy 脚本中,它将是 vars.get('__jm__Thread Group__idx)`

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-02
    • 1970-01-01
    • 1970-01-01
    • 2013-05-20
    相关资源
    最近更新 更多