Any reason why you are not setting this on the thread group ?
https://jmeter.apache.org/usermanual/component_reference.html#Thread_Group
- Action to be taken after sampler error

If you still want to do it in code , Im guessing the method also should be
on the thread group not on the sample result .

On Thu, Nov 8, 2018 at 10:03 AM JMeter User <userseljm...@gmail.com> wrote:

> I'm trying to stop the test if one of the sampler fails.But test is not
> stopped instead it continues with next sampler execution.
> Code looks like this
>
> if(results.empty) {
>     WDS.sampleResult.successful = false
>     WDS.sampleResult.sampleEnd();
>     WDS.sampleResult.setStopTest(true);
> }
> else
> {
> WDS.sampleResult.sampleEnd();
> WDS.log.info("Sample Ended - SUCCESS");
> }
>

Reply via email to