Hello all!
Could you please help me with one moment in scenario?
I have a sequence of requests and I want to start second request after the first, third after second and so on.
Or may be it i a possibility to execute second request as a subrequest (or a part) of first request
My scenario looks so:
package basic
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
class SomeSimulation extends Simulation {
val scn = scenario("My scenario").during(600 seconds) {
exec(
http("First")
.get("http://myserver/some/")
.check(xpath("/result/href/text()").find.saveAs("other"))
)
.exec(
http("Second")
.get("${other}")
.check(status.is(200))
)
.exec(
http("Third")
.get("http://myserver/something/else")
)
}
setUp(scn.inject(atOnceUsers(10000)
))
.throttle(
reachRps(4000) in (600 seconds),
holdFor(120 seconds)
)
}
After running the test I see that at first I have few thousands of "first" requests,
And then the second requests start - and requests are failed, because "other" attribute could not be found
This "other" attribute is different for every request.
How can I reach the sequential query execution:
- first
-second
-third
-first
-second
-third
...
and so on... ?
Thanks in advance,
Anna