Not able to test one way websocket using Gatling

Hi All,

I am trying to write Gatling test cases for one way web socket (request is single but response is streaming), but not able to do that.

When I run Gatling test cases, request goes to the server successfully, but Gatling script does not stop and it prints below message in every 5 seconds for infinite time.

When I convert my request to 2 way websocket, it runs fine, but my use cases it o have one way web socket.

Code snippet:


val httpConf: HttpProtocolBuilder = http

val scn: ScenarioBuilder = scenario(“one way websocket”)
.exec(ws(“Connect WS”).open(“streaming/messages”))
.exec(ws(“Say Hello WS”)
.exec(ws(“Close WS”).close)

setUp(scn.inject(rampUsers(3) over (RAMP_OVER_TIME seconds)).protocols(httpConf))


Please let me know how can we make it correct ?