.during(3 seconds) {
exitBlockOnFail(chain_404)
}
setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
}
This approach exits the chain upon check evaluating to false, ie. "index" is not expected to be present in a simulation result.
Example:
================================================================================
2015-11-26 16:13:16 3s elapsed
---- For duration attempt to connect to known 404 ------------------------------
[##########################################################################]100%
waiting: 0 / active: 0 / done:1
---- Requests ------------------------------------------------------------------
> Global (OK=0 KO=25 )
> known 404 (OK=0 KO=25 )
---- Errors --------------------------------------------------------------------
>
status.find.in(200,304,201,202,203,204,205,206,207,208,209), b 25 (100,0%)
ut actually found 404
================================================================================
Happy gunning :)