Is it possible to access session values and still execute a ChainBuilder object? The way my code’s setup at the moment, the http request never actually gets executed since it's just returning the session. I need the session attributes to build a header parameter with all those session values.
val testTCSService = scenario("Some Scenario")
.doIf(session => session.contains("value")) {
exec(session => if(session.contains("otherValue")) session else session.markAsFailed)
.exitHereIfFailed
.exec{session => OtherClass.verifyHTTPCall(session("value").as[String], session("secondValue").as[String], session("thirdValue").as[String])
session}
}
def verifyHTTPCall(token: String, realmId: String, userId: String): ChainBuilder = {
exec(http("HTTP Call")
.post("Some URL")
.header("header_value", generateHeader(value, secondValue, thirdValue))
.check(status.is(200))
}