Gatling-scala check 2 status codes (either or)

Ak47 picture Ak47 · May 15, 2015 · Viewed 7.4k times · Source

In a gatling test, I am trying to verify whether the response for a request is either 204 or 404.

val scn = scenario("Scenario A").exec(httpRequest
    .check(status.is(204)))

where httpRequest is a request defined elsewhere. I want to check whether the test to pass is response is 204 or 404. Couldnt find anything to use or in a check

Answer

Stephane Landelle picture Stephane Landelle · May 15, 2015

Please have a look at the documentation:

status.in(204, 404)