Hi, I’m trying to figure out how to get access to a session var for later use in a scala function. I’ve searched through the forum and I’ve tried the following with no success. What do I need to do?
`
var mId = ""
val scn = scenario("ReadLogs")
.exec(http("Some Request")
.get("/somepath")
.check(jsonPath("$.id").findAll.saveAs("myId")))
.exec(session => {
mId = session.get("myId").as[String]
println("My Id: " + mId )
session
})
def someFunction(): Unit = {
//do something with mId
}
`