Jmeter停止当前迭代问题

Jmeter stop the current iteration issue

如何使用 jmeter 停止当前迭代并使用 beanshell 脚本移动到下一个迭代。 (不使用测试操作元素)

我尝试了 ctx.setRestartNextLoop(true) 但这不起作用。

JMeter 版本:5.2.1

  1. Since JMeter 3.1 it's recommended to use JSR223 Test Elements and Groovy language 任何形式的脚本
  2. 如果出于某种原因(虽然我没有看到任何正当理由)您仍然想使用 JSR223 Sampler instead of Flow Control Action 采样器来执行此操作 - 相关代码将是:

    SampleResult.setIgnore()
    ctx.setTestLogicalAction(org.apache.jmeter.threads.JMeterContext.TestLogicalAction.START_NEXT_ITERATION_OF_CURRENT_LOOP)
    

有关 JMeter 中 Groovy 脚本的更多信息:Apache Groovy - Why and How You Should Use It