Gatling Check on Web socket

Hello @here
First of all, I want to thanks a lot the Gatling team for there amazing tool !!!
It really really helpfull, and give us the oportunity to optimize our Cloud Web app.

I’m here because I have two problem I want to fix :

  1. When I open a websocket, is there a way to check if the ws is correctly open ?

Something like we have on http ( .check( )

  1. When the websocket is correctly open, I send a message and wait for the 4th message. If it contains “FLOW_ERROR”, I want to consider that there is an error.
    Currently, I’m doing that :
.group("Computation") {
  ).pause(minPause second, maxPause second)
.doIf(session => session.contains("first_action_status") && session("first_action_status").as[Seq[String]].exists(_.contains("FLOW_ERROR"))) {

When I get the FLOW_ERROR, I need to perform a Get on an endpoint that I know it will return me 200 and I compare it to 251 to be sure it will fail.

I’m pretty sure there is something smarter than that :slight_smile:

Thanks a lot for your help and feedback.

Best regards,