Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Able to connect to socket, but only getting sids and not message I expect #86

Open
leibson opened this issue Mar 2, 2022 · 0 comments

Comments

@leibson
Copy link

leibson commented Mar 2, 2022

When I run a python script with python-socketio to connect to the socket I'm interested in, I can see the messages I want.

When I attempt to do the same thing using the JMeter WebSocketSampler, I do not see those messages.

Here is the Python & result. I run this while I run my JMeter script which simply makes a few REST API requests.
Note the Cookie is essential to make this work.

sio.connect("https://events.dev.xxx.com", transports='websocket',
            headers={'Sec-WebSocket-Extensions: permessage-deflate', 'Sec-Fetch-Dest: websocket',
             'Sec-Fetch-Mode: websocket',
             'Cookie: xxxSESSIONDEV=NTI3MzkwNWUtMTJmNS00Y2U0LTk1NGUtMjQ2Mzk5OTYxZWE0'})

Result

...
...
Received packet MESSAGE data 2["message","{\"locationId\":110,\"name\":\"GAME_STARTED\",\"payload\":{\"id\":146724,\"boxId\":2002,\"userId\":419,\"createdAt\":\"2022-03-02T14:35:31\",\"lastModifiedAt\":\"2022-03-02T14:35:36.752\",\"completedAt\":\"2022-03-02T14:35:36.621\",\"activationMethod\":\"TAG\",\"nfcTagId\":\"OONqDs87Si\",\"gameCount\":1,\"app\":false}}"]
...
...

Here is what I have tried:
image

It simply returns

[Frame 1]
0{"sid":"-cFd4kXc2PMtKDGOACB2","upgrades":[],"pingInterval":25000,"pingTimeout":20000}

[Message 2]
0{"sid":"-cFd4kXc2PMtKDGOACB2","upgrades":[],"pingInterval":25000,"pingTimeout":20000}

What am I missing?

The JMeter test plan has a Cookie Manager. Not sure what else to try.
The JMeter Header Manager has the headers above, in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant