I want to convert Slik Performer test scripts to Gatling, but I am blocked by wss
(WebSocket Secure). I following the gatling document https://gatling.io/docs/3.3/http/websocket/, but text message could not send to Web Socket Server.
Web Socket Endpoint: wss://xxxxx.mycompany.com
val myHttpProtocol = http
.baseUrl(“https://xxxx.mycompany.com”)
.inferHtmlResources(BlackList("""..js""", “”"..css""", “”"..gif""", “”"..jpeg""", “”"..jpg""", “”"..ico""", “”"..woff""", “”"..woff2""", “”"..(t|o)tf""", “”"..png""", “”".detectportal.firefox.com."""), WhiteList())
.acceptEncodingHeader(“gzip”)
.wsBaseUrl(“wss://xxxx.myservice.com”)
.wsMaxReconnects(1)
val submitOrder: ChainBuilder = exec(addSngWSCookies)
.exec(session => session.set(“currentDateTime”, ISO_TIMESTAMP.toString))
.exec(ws(“connect websecket”).connect("/ws")
.headers addSngHeader ++ headers_ws))
.exec(ws(“submitOrder”)
.sendText(submitOrderMessage("""${totalAmount}""", “”"${tenderId}""", “”"${checkoutId}""", “”"${currentDateTime}""")))
.exec(ws(“close websecket”).close)
setUp(
scenario(“SC01”).exec(submitOrder).inject(atOnceUsers(1))
).protocols(myHttpProtocol.inferHtmlResources())
I turn on trace level, and WSS connection received 200 status code, and then stop; text doesn’t send at all.
I have one very complicate scenario: it calls service1 for sessionId and perform some actions, then call WebSocket Secure(wss) endpoint 1 and WebSocket Secure(wss) endpoint 2.
My Question: Does Gatling support Web Socket Security (wss)??
According to wikipedia: The WebSocket protocol specification defines ws
(WebSocket) and wss
(WebSocket Secure) as two new uniform resource identifier (URI) schemes[4] that are used for unencrypted and encrypted connections, respectively.
Thanks for your help
Lucy