Hey Guys,
I am using ‘rendezVous’ within ‘repeat’ and it’s working fine for 1st iteration but from 2nd iteration its not waiting for defined users in ‘rendezVous’ and code is being executed. Here is my scenario:
- Ramp-up users (e.g. 5 users)
- Repeat Step 3 to 5 for three times (using repeat(3))
- Wait until all the users ramped-up (using rendezVous(5))
- Execute the request (defined using exec())
- Pause for some random time (e.g. pause(10, 15))
Actual Result:
- For 1st iteration rendezVous waits for all the 5 users and then executes the request.
- From 2nd iteration rendezVous is not waiting for all the 5 users and request is being executed as and when user completes its pause time defined in 5th Step.
Below is code for reference:
class rendezVousWithinRepeat extends Simulation {
val scn = scenario("rendezVous within repeat")
.repeat(3) {
rendezVous(5)
.exec(
http("/rendezVous-within-repeat/")
.post("<application-end-point>")
.header("Content-Type", "application/json")
.body(ElFileBody(ProjectBaseDirectory + "/src/test/resources/bodies/data.json"))
.check(status.is(201))
)
.pause(10, 20)
}
setUp(scn.inject(rampUsers(5) during (2 seconds)))
}
I did not find any success how to reset rendezVous state after completion of iteration.
Please help me.