Reputation: 445
I have a Gatling performance script to test the logout page. After getting the home page, I send the request to logout page. the request for https://..../logout.html is 200 OK.
.exec(http("getHomepage")
.get("https://.../home/home.jsp")
.silent
.check(status.find.in(200))
.check(bodyString.saveAs("responseBody"))
.headers(headers_1))
.exec(http("getLogoutPage")
.get("https://..../logout.html")
.headers(headers_1))
But when calling GET https://..../logout.html, it will also have some other request like .js, .css, .png. Some of them get 404.
>getLogoutPage (OK=14 KO=0 )
>XD-IMG-Warn.png (OK=0 KO=13 )
And the error:
[WARN ] i.g.h.a.ResponseProcessor - Request 'XD-IMG-Warn.png' failed: status.find.in(200,304,201,202,203,204,205,206,207,208,209), but actually found 404
The Error for XD-IMG-Warn.png does not really matter, I only care about the getLogoutPage result. So my question is how to ignore this error during running the test?
Upvotes: 1
Views: 2779
Reputation: 2614
for requests that you don't care about the results of, you can just mark them as silent so they are not included in reports and don't result in KOs.
to do this you can just chain .silent
after any request you don't want reported
detailed in the docs at https://gatling.io/docs/2.3/http/http_protocol/#http-protocol-silencing
Upvotes: 1