1
votes

how to stop current iteration using jmeter and move to next iteration using beanshell script. (Without using test action element)

I tried ctx.setRestartNextLoop(true) but this is not working.

JMeter version: 5.2.1

1

1 Answers

0
votes
  1. Since JMeter 3.1 it's recommended to use JSR223 Test Elements and Groovy language for any form of scripting
  2. If for some reason (I fail to see any valid reason though) you still want to do this using JSR223 Sampler instead of Flow Control Action sampler - the relevant code would be:

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

More information on Groovy scripting in JMeter: Apache Groovy - Why and How You Should Use It