0
votes

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?

2

2 Answers

0
votes

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.

0
votes

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 ?