How to add assertion on response message in jsr223 postprocessor using java code.
I tried using AssertionResult.setFailure(true);
but it is not working
Use JSR223 Assertion instead JSR223 PostProcessor
JSR223 Assertion allows JSR223 script code to be used to check the status of the previous sample.
You are missing calling setFailureMessage
AssertionResult.setFailureMessage("Your reason for failure");
The script can check various aspects of the
SampleResult
. If an error is detected, the script should useAssertionResult.setFailureMessage("message")
andAssertionResult.setFailure(true)
.