Good day, I’m currently working on seemingly simple algorythm that sends requests in “during” loop and perform logout-login action if request failed. But Gatling acts strangely on any attempts to check if request failed.
Here is the code in current state:
exec(login)
.pause(login_lower,login_upper)
.during(duration, exitASAP = false) {
tryMax(repeats){
doIfEquals(session => session.status,KO) {
println("\n\nIn the doIfEqueals\n\n")
exec(logout)
.exec(login)
}
.exec(request)
}
}.exitHereIfFailed
}.exec(logout)
After running this script Gatling prints "in the doIfEquals" before warmup and goes in after request fail and prints it again, but doesn't execute logout-login.
Tried many options like grabbing response code and comparing to 200, different locations of relogin, different condition operators, but no success for now.
Does anybody have any thoughts or advices regarding this situation?