Reputation: 11
I am executing a JMeter script using a 'Cloud-based Apache JMeter Load Test' task in VSTS. I have a response assertion as a part of the JMeter test. I am able to trigger the tests through a release definition in VSTS. When the assertion fails, I want to fail the release. Currently the release succeeds with a warning like this:
2018-02-21T18:23:31.1885342Z ##[warning][Exception] 1 occurrences of ['Test','HTTP Request','WebException'] : Please download the test logs to see the response data for this url https://www.xyz
The warning is good but I want to fail the release if the JMeter test failed. Any idea how to do it? Or if there is a way to parse warning from execution of a release step, I could may be use that in Powershell Script and exit with error but I am not sure how to read warnings from VSTS release log/task.
Upvotes: 1
Views: 386
Reputation: 33698
Regarding retrieve release task log during release:
##[warning][Exception]
in the log)Upvotes: 0
Reputation: 58772
If you want to stop thread on error you have such option in Thread Group Action to be taken after a Sampler error
determines what happens if a sampler error occurs, either because the sample itself failed or an assertion failed
Choose Stop Thread or Test
Stop Test – the entire test is stopped at the end of any current samples. It means the pending samplers are still run until done.
Upvotes: 1