def getSessionDetails(
sessionId: String,
expectedStatus: String = "success"
) = {
exec(
http("/cap/getSessionDetails")
.get("/cap/getSessionDetails.do")
.queryParam("sessionID", sessionId)
.check(status.in(200))
.check(jsonPath("$.status").is(expectedStatus))
.check(
jsonPath("$.data.sessionTimes[0].enrollmentStatus").find
.saveAs("enrollmentStatus")
)
.check(
jsonPath("$.data.sessionTimes[0].id").find.saveAs("sessionTimeID")
)
).exec { session => println(session) session }
}
I am trying to get values to print for debugging, but no matter where I put the println line of code in this block, I get some kind of error. Right now as it is, I get "value session is not a member of Unit". Looking at other examples, I can't tell where mine is different.