Print raw SSE push content

22 views
Skip to first unread message

Ihor

unread,
Feb 21, 2018, 12:47:24 PM2/21/18
to Gatling User Group
Hi

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.
Reply all
Reply to author
Forward
0 new messages