Hi,
I am implementing a test using websocket under gatling 2.
I would like to use the session in the check to be able to validate that the response has some data I sent in the request.
Let say I saved id to the session and I would like to validate it against the response.
case class Handshake(id: String = “${id}”, channel: String = “/meta/handshake”, supportedConnectionTypes: List[String] = List(“long-polling”), version: String = “1.0”)
…
.exec(session => session.set(“id”, “1”)).exec(ws(“Handshake”).sendText(Handshake().toJson).check(wsAwait.within(5 seconds).until(1).message.transform(message => {
if(message.fromJson[List[Response]].get(0).id == ??? ) …
I haven’t found any way to be able to use the session in the check method.
Is it possible some how?
Thanks,
Krisztian