Why is "JMeterThread.last_sample_ok" set to true when an assertion error

The jmeter document states

http://jmeter.apache.org/usermanual/component_reference.html#assertions

The JMeterThread.last_sample_ok variable is updated to true or false after all statements for the sampler have completed.

I have an http sampler in my test plan that performs a login with two redirects.

Interestingly, I found that JMeterThread.last_sample_ok was set correctly even after my statement fails. I use the answer to validate the string after login. The variable is set to true even if the statement fails. This leads to the fact that the next "if the controller" continues to work with incorrect answers. Did I miss something.

Thanks to Advance for your help.

+4
source share
1 answer

For my Apache JMeter 2.11, everything works as expected.

I use a condition ${JMeterThread.last_sample_ok}==falsein If Controller

Debug Sampler , , JMeterThread.last_sample_ok "" , .

Debug sampler

, If Controller , , Debug Sampler View List. Apache JMeter script JMeter script.

+2

All Articles