I planned to create Test Plan in my JMeter like below
- Test Plan
- Thread Group
- Loop Controller
- HTTP Request Sampler 1
- HTTP Request Sampler 2
- HTTP Request Sampler 3
- HTTP Request Sampler 4
- HTTP Request Sampler 5
- HTTP Request Sampler 6
- HTTP Request Sampler 7
- HTTP Request Sampler 8
- If Controller condition ${JMeterThread.last_sample_ok}==false
- SMTP Sampler
- Loop Controller
I would like to run the test 24/7. If one (or more) HTTP Request Sampler returns error for what ever reason, then execute the SMTP sampler and send email to me.
If none of the HTTP Request Sampler returns error , then do not execute SMTP sampler but keep repeating the loop forever.
I don't quite understand the if controller condition ${JMeterThread.last_sample_ok}.
What does JMeterThread.last_sample_ok mean?
Last_sample_ok means only the last HTTP Request sampler (in my case HTTP Request Sampler 8 only) ? If I want to check the condition for every sampler 1-8, what can be done here?Is JMeterThread a JMeter Java class or Java object?
- Besides last_sample_ok , what other method can be applied to JMeterThread object?
Thanks.