how to mention timer in jmeter run taurus yaml code

56 Views Asked by At

I have added uniform random timer under thread group. I am running load test in azure pipelines. Is there any way that, I can mention that timer in yaml code instead of jmeter script

Timers under jmeter script are not working as expected. So need to check whether they will work properly if mentioned under yaml code in azure pipelines

1

There are 1 best solutions below

0
Dmitri T On

As of now (Taurus 1.16.25) you cannot configure a Timer via YAML, the options are in:

  1. Action Block which adds a Flow Control Action sampler, the syntax would be:

    requests:
    - action: pause
      target: current-thread
      pause-duration: 1s500ms      
    
  2. JSR223 Blocks which add a JSR223 PreProcessor or JSR223 PostProcessor, you can use arbitrary Groovy code like:

    requests:
    - url: http://example.com/
      jsr223: 'java.util.concurrent.TimeUnit.SECONDS.sleep(10)'
    

With regards to "Timers under jmeter script are not working as expected" Timers work as designed, to wit create a pause before each Sampler in their Scope, it might be the case your "expectations" differ from the actual Timers behaviour. See A Comprehensive Guide to Using JMeter Timers for more details if needed.