Reputation: 4660
I want to make my continuous integration system understand when a JMeter test has failed.
I am thinking of using the stdout
logs for that.
Is there a way to check inside a BeanShell PostProcessor if there are failing assertions?
Then I can log a GUID or something like that to signify that the test has failed.
Also, any idea how to log to stdout
and not only inside the log file? JMeter logs some info to stdout
but I am not sure if a log.error("code")
will go there.
If there is any easier way, feel free to share.
Upvotes: 0
Views: 379
Reputation: 168157
Assuming all above you need to add JSR223 Listener with the following code:
prev.getAssertionResults().each { assertionResult ->
if (assertionResult.isFailure()) {
println('Assertion failed')
}
}
Upvotes: 1