need example for socket.io with JWT
See original GitHub issueHi
I am trying to use artillery to test my socket.io server under artillery 1.5.0-22 and socket.io 1.4.5
I auth the user with JWT while connecting. Connecting with socket.io client looks like
io.connect('https://mywebsite', {
'query': 'token=' + the JWT,
'transports': ['websocket']
});
and the url looks like
wss://mywebsite/socket.io/?token=the JWT&transport=websocket
I tried to write similar script as the socket.io example, but I have no idea where should I insert the token. Also, it seems when running this test none of the request actually hit the server.(I will have log if someone is trying to connect without a token or incorrect signature) If this approach is possible with artillery please kindly provide me a short example.
Thanks very much~
config:
target: "https://mywebsite/"
phases:
-
duration: 10
arrivalRate: 1
scenarios:
-
engine: "socketio"
flow:
-
emit:
channel: "room:join"
data:
id: "6ec82266-de6f-11e6-bf01-fe55135034f3"
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
PR submitted 😃
Hi Guys,
The following is my full config that I came up with after your comment:
but now it starts 10x get, 10x first post and 10x second post. Is there a way how to iterate the scenario one by one in sequence? (not 10 x first + 10 x second + 10 x third, but 10 x (first + second + third))
Thank you