I want to run a simulation (or maybe a set of simulations in the future) and assert if the simulation ran “successful” or not
I define “Successful” as = no request got an HTTP Status Code 400 returned
If there is a single HTTP Status code 400, the simulation should fail (e.g. maven should provide a “Build failure” or a exit code 1)
Maybe the use case seems awkward, but my plan is to publish a successful run further to my colleagues. If the simulation has an error (aka a 400 error was returned), it should not be published any further.
On the assertion page here, I found, that there could be assertions, but those target “only” on the times/percentiles.
Thank you very much @slandelle and @GeMi for your help and your support!
Your solution counts HTTP 5xx errors as “failed requests” too. But I do not want to consider those requests-responses, because those errors are not caused by my Gatling simulation but by the BE or infrastructure. So my intention is, if my simulation does not produce any 4xx errors, I continue with further steps.
Hmmm … yesterday I found this solution in powershell though:
So, if a 4xx error is logged in the last ‘simulatioin.log’ file, I exit the pipeline respectively the GitHub Action. Feels hacky, but it works quite well so far.
I’ll let you know if I can come up with a better solution. But for now, I leave everything like it is.
Thanks guys for your help … and also for this great community here!
Kind regards!