# Does Gatling support Web Socket Security (wss)?

**URL:** <https://community.gatling.io/t/does-gatling-support-web-socket-security-wss/5392>\
**Category:** Gatling (Open-Source)\
**Created:** [December 8, 2019, 8:47am UTC](https://community.gatling.io/t/does-gatling-support-web-socket-security-wss/5392 "2019-12-08T08:47:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucy](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@Lucy](https://community.gatling.io/u/Lucy)\
**Post date:** [December 8, 2019, 8:47am UTC](https://community.gatling.io/t/does-gatling-support-web-socket-security-wss/5392/1 "2019-12-08T08:47:08Z")

</div>

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/](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](https://xxxx.mycompany.com)”)  
.inferHtmlResources(BlackList("""._.js""", “”"._.css""", “”"._.gif""", “”"._.jpeg""", “”"._.jpg""", “”"._.ico""", “”"._.woff""", “”"._.woff2""", “”"._.(t|o)tf""", “”"._.png""", “”"._[detectportal.firefox.com](http://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](https://en.wikipedia.org/wiki/Uniform_resource_identifier) (URI) schemes[[4]](https://en.wikipedia.org/wiki/WebSocket#cite_note-4) that are used for unencrypted and encrypted connections, respectively.

Thanks for your help

Lucy

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [December 8, 2019, 11:17am UTC](https://community.gatling.io/t/does-gatling-support-web-socket-security-wss/5392/2 "2019-12-08T11:17:38Z")

</div>

Yes it does.  
Can’t help you without you providing a way to reproduce your problem.
