Hey I used the recorder to create a simulation for our web app. So
there are a zillion requests for static content (css, js etc) and then
a handful of calls to our API. I have organized everything into
chains so my actual scenario just looks like:
val scn = scenario("Scenario name")
.insertChain(getResource)
.pause(0, 100, MILLISECONDS)
.insertChain(getStaticContent)
.pause(13, 14)
.insertChain(postId)
.pause(0, 100, MILLISECONDS)
.insertChain(postPageView)
.pause(0, 100, MILLISECONDS)
.insertChain(getOfferStaticContent)
.pause(20, 21)
.insertChain(postOffer)
Now what I would like to do it make sure all the http requests return
with a 2xx. Is there any way to do that short of adding 'check(
status.in(200 to 210) )' to every exec? I tried something like this:
...
insertChain(getResource).check( status.in(200 to 210) )
...
But that obviously didn't work. Is there a way to apply a check like
this across an entire chain? I see in the docs 'multi-valued checks'
but I'm unclear how to use them or if they are even what I'm looking
for in this case.
Alternatively it would be OK if the recorder populated this check for
me but I don't see any options for that. Either way it would make for
easier to read simulations if I could apply checks across many exec's
in one place.
Thanks really loving Gatling so far!
Chris