Ok, I got this resolved using “doIfOrElse” block like this :
doIfOrElse(logger.isDebugEnabled()){
exec(
http("LandingPage")
.get("/login") ///c11/v1603.116/729542582413511/login
.header("Accept","text/plain; charset=utf-8")
.header("Upgrade-Insecure-Requests","1")
.check(status.in(200,302))
.check(bodyString.saveAs("qboLandingPageValidPayload"))
.check(responseTimeInMillis.saveAs("execLatency"))
.check(regex("name=\"parentID\" value=\"(.*?)\"><input id=").saveAs("parentid"))
)
}
{
exec(
http("LandingPage")
.get("/login") ///c11/v1603.116/729542582413511/login
.header("Accept","text/plain; charset=utf-8")
.header("Upgrade-Insecure-Requests","1")
.check(status.in(200,302))
.check(responseTimeInMillis.saveAs("execLatency"))
.check(regex("name=\"parentID\" value=\"(.*?)\"><input id=").saveAs("parentid"))
)
}