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
.baseURL(s"http://localhost:57364/demo/")
.wsBaseURL(“ws://localhost:57364/demo/”)

val scn: ScenarioBuilder = scenario(“one way websocket”)
.exec(ws(“Connect WS”).open(“streaming/messages”))
.pause(1)
.exec(ws(“Say Hello WS”)
.sendText("")
.check(wsAwait.within(30).until(1).regex(“200”))
)
.pause(1)
.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 ?

Thanks