Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gatling 2: concurrent request handling

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)

like image 204
bestboy Avatar asked Sep 28 '22 19:09

bestboy


1 Answers

Answer is: b, when all resources have been fetched.

like image 171
Stephane Landelle Avatar answered Oct 31 '22 12:10

Stephane Landelle