0

Is it possible to automate the load tests in Jmeter and increase the number of threads until the first error is observed?

For example I start with testing 16 threads for every seconds and increase the number until i receive an error. But instead of doing this manually can I let this run automatically?

Vincent Claes
  • 3,960
  • 3
  • 44
  • 62

2 Answers2

0

Looking into Pre-defined Properties section of JMeter's User Manual on Functions there is a JMeterThread.last_sample_ok variable holding result of the last sampler execution.

So if you build your test plan as follows:

  • Sampler which does test action
  • If Controller checking whether previous sampler was successful
    • If not - relevant actions (stop test, send email, stop ramping up virtual users, etc.)

The value you need to put in "Condition" input of If Controller should look like

"${JMeterThread.last_sample_ok}"=="false"

See How to use JMeter's 'IF' Controller and get Pie for more information on JMeter's If Controller.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
0

Regarding threads in jmeter You may find those 2 links interesting:

Regarding your methodology, why not use slow rampup and see the limit using what Dmitri T has provided ?

Community
  • 1
  • 1
UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116