Hello,
I would like to execute a couple of requests in chain asynchronously, so that they do not block the requests that follow them. I tried doing this by wrapping the request execution in a Future:
`
def asyncRequest(req: => HttpRequestBuilder, max_time: Long): ChainBuilder = {
val future = Future {
exec(req)
}
f.onComplete {
case Success(result) => result
case Failure(e) => exec(session => session.set(
req.commonAttributes.requestName + " - Timeout",
session.get(req.commonAttributes.requestName + " - Timeout").as[Integer] + 1
))
}
exec()
}
`
And then doing
`
val myScenario = during(…) {
exec(req1)
.exec(asyncRequest(req2))
.exec(req3)
}
`
The request req2 does get made successfully, since the necessary operation happens on the test server, but that request does not appear in Gatling’s HTML report.
My question is:
- Why do metrics for that request not appear in the report?
- Is there a better way of doing this?
Thank you very much!