I have a question regarding the behavior of Gatling when using .exec
in combination with .resources
.
The documentation describes the behavior very briefly:
Allows to fetch resources in parallel in order to emulate the behaviour of a real web browser
Let's 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 .exec
block for Resource X being executed?
a) As soon as the "main request" of the first .exec
block returns (i.e. when the Base Page request returns)
b) When all requests of the first .exec
block returned (i.e. when the Base Page as well as Resource A and Resource B have been fetched)
Answer is: b, when all resources have been fetched.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With