I have a question about the behavior of Gatling when used .execin conjunction with .resources. The documentation describes the behavior very briefly:
Allows you to request resources in parallel to emulate the behavior of a real web browser
Consider the following simple scenario:
val scn = scenario("Test Scenario")
.exec(
http("Base Page").get("/")
.resources(
http("Resource A").get(host + "/resource_a.js"),
http("Resource B").get(host + "/resource_b.js")
)
)
.exec(
http("Resource X").get(host + "/resource_x.js")
)
My question is: when is the second block executed .execfor resource X?
a) As soon as the “main request” of the first block is .execreturned (ie when the request of the base page is returned)
b) When all requests of the first block are returned .exec(i.e. when the base page is selected, as well as resource A and resource B)