Hello Gatling community,
Is there example or documentation how to performance test with Gatling following request/response flow:
send a request, e.g. to /foo endpoint
validate response, e.g. that response code is one of acceptable ones
if validation fails, consider request/response as failure
else if response code was one of the valid ones, then extract from response body content and use it as parameter in a different request to endpoint /bar, chained to previous /foo request
else if /foo response code was another of the valid ones, in this case response body is empty content, just count the initial /foo request as successful one, and do not make the request to /bar
Currently we’re (I think ab)using Gatling check API to do the check and extract parameter from /foo request body (put it in a session). Extraction can fail when body is not present, even though request to /foo in that case we would like to be counted as success. So it’s far from ideal.