I am trying to test my SSE server with Gatling. Actually here is my code :
class SSE extends Simulation {
val httpConf = http
.baseURL("http://localhost:64096")
.acceptEncodingHeader("gzip, deflate, br")
val testScenario = scenario(this.getClass.getName)
.exec(
sse("SSE").open("/sse")
.check(wsAwait.within(50).until(1).regex(""""event":"snapshot(.*)"""")))
setUp(
testScenario.inject(constantUsersPerSec(1) during(1 seconds))
).assertions(
).protocols(httpConf)
}
My regex check never passes with pattern '
""""event":"snapshot(.*)""""' , but works for "(.*)" so I want to find the issue. Is it possible to subscribe to event kind of 'onMessage' or smth to see raw data of SSE push? Cannot find a suitable method.
Thanks a lot.