Are all of the tests inside a repeat loop executed synchronously or async? What I am wondering if I have a repeat of 10, will that fire up 10 separate async messages in a parallel or will it wait for each one to finish before it finishes? As well how many connections does 1 virtual user open when I use repeat in a scenario? Also, if 1 user repeats one POST request, does the user then open new connections for each POST request or is the first established Keep-Alive connection used for consecutive requests?
As an example here is the basic outline of the test scenario:
exec(
exec { session =>
repeat(10, “n”) {
exec(
exec {
http(“write”)
.post("/write")
.body(StringBody("""{ “contactid”: ${contactid}, “version”: ${version}, “transactionId”: “3248”}"""))
.check(bodyString.transform(x => MyTest.applied(x)).saveAs(“applied”))
},
exec(session =>
session.set(“version”, session(“version”).as[Int] + 1)),
)
},
doIf("${applied}") {
exec {
http(“versions”)
.get("/all/${contactid}")
.check(bodyString.transformOption(x => MyTest.checkVersion(x)).is(10))
}
}
)
Thank you,
Ryan