class TestSimulation extends Simulation {
val scn = scenario(“Test”)
.feed(someFeeder)
.exec(createUser)
.during(60, exitASAP = false) {
exec(LoadPage)
.exec(LoadSecondPage)
}
def loadPage: ChainBuilder = {
exec(
http(“Page 1”)
.get("/page1")
)
}
def loadPage: ChainBuilder = {
exec(
http(“Page 2”)
.get("/page2")
)
}
setUp(scn.inject(rampUsers(50) over(10 seconds).protocols(http.baseURL(“http://testurl.com”))
}
When run, this causes a synchronization at the bottom of the loop. I would expect once the first page is loaded, the second page should be immediately loaded, but in this scenario it actually waits until all 50 users are finished before it will try to load the second page.
Any idea if I’ve set something up incorrectly, or is this expected behavior? If this is expected, how can I get the scenario to execute without synchronization between calls in a loop?