Reputation: 33
Is it possible to get assertion failed in tree view listener using this line of code in JSR223 Assertion?
assert 1 == 2
Before in JMeter version 3.1 i could do this without any problem and now its just not working. I know i can use these lines of code
if(1 != 2) {
AssertionResult.setFailure(true)
AssertionResult.setFailureMessage('They are not equal') }
but i would, if possible, like to keep it simpler and shorter like before, with just one line of code
Upvotes: 2
Views: 116
Reputation: 34516
Using assert will be possible in next 4.0 version as per:
You can try jmeter nighlty build:
I don’t think it was possible to do that in 3.1
Upvotes: 2
Reputation: 168002
I do confirm it is possible to use the above code for failing a sampler in JMeter 3.3 (latest version as of now)
Make sure that:
Upvotes: 0