Gatling websocket api: can't receive byte response from websocket server in wsListen method

255 views
Skip to first unread message

Hardik Patel

unread,
Feb 2, 2017, 1:56:23 PM2/2/17
to Gatling User Group
Hi,
 Is anyone able to get byte response from websocket api on gatling using wsListen method?
 I am doing this:

.exec(ws("acceptable_messages")
.sendBytes(Array[Byte](1.toByte, 0.toByte, 0.toByte, ))
)
        .exec(ws("Message Check").check(wsAwait.within(10 seconds).until(1).regex("ACK").saveAs("name"))) 
.check(
wsListen
.within(10 seconds)
.until(1)
                        .regex("ACK")
                        .saveAs("name")
                  )
)
       .pause(10)
       .exec(ws("Close WS").close)

  When server sends text message, this code can store name in session but if byte array is sent, this does nothing.

Thank and Regards
Hardik Patel

Hardik Patel

unread,
Feb 2, 2017, 1:58:40 PM2/2/17
to Gatling User Group
I am using gatling 2.2.3

Connor Reid

unread,
Jul 15, 2017, 12:05:00 PM7/15/17
to Gatling User Group
I am having the exact same issue in that I can't grab a binary WebSocket response using the Gatling DSL. If you turn your logback.xml log level from "Warn" to "Debug", you will get this nice message when you attempt to check a WebSocket call which returns a binary message: "Beware, byte message checks are currently not supported" (WsActor.scala line 177 in the Gatling source).

Only 2 options: 1) hope the Gatling devs implement such support, or 2) implement support and create pull request.

Best,

- Connor

martink...@gmail.com

unread,
Oct 13, 2017, 8:55:33 AM10/13/17
to Gatling User Group
Hey,

I also want to check binary response from the server. But I didn't find a solution.
Does someone find a solution to check it?

I also found this:

 case OnByteMessage(message, time) =>
       logger.debug(s"Received byte message on websocket '$wsName':$message. Beware, byte message checks are currently not supported")

So I think it's not possible... Does someone find a solution to check it?
Reply all
Reply to author
Forward
0 new messages