Stress testing WebSockets in Jmeter
Asked Answered
F

2

13

I'm trying to stress test my WebSocket server using Jmeter's plugin (jmeter-websocket). The thing is that the plugin comes with no documentation how to work with it and thus I'm not sure if my expectations of it is supported or not.

I managed to run a sample test using the mentioned plugin and it was successfully connected to server. It also managed to communicate with server but once it was done receiving the first response it disconnected. I was hoping to configure this plugin in a way so it will maintain a persistent connection with WebSocket server for several minutes, sending and receiving a couple of messages before it is disconnected.

By stress testing I would like to see how the number of concurrent connections affect my application's behavior. Is this plugin suitable for my needs? If it is then how should I work with it?

Fluorescein answered 1/9, 2013 at 10:31 Comment(4)
Have you found out how to do this? I'm also trying to keep the WebSocket openGaylord
Unfortunately, no. As you can see no response is given yet (to be honest I don't think there will ever be one).Fluorescein
That is rather unfortunate. Did you end up using another benchmarking tool? I need one which can not only utilize WebSockets but send JSON messagesGaylord
Once I find a solution around this problem (one way or another) I will post it here but unfortunately I haven't yet. The only thing I can add to you comment is that sending JSON messages is rather simple (since they are but simple text sent as in POST), so your only concern should be stress testing WebSockets.Fluorescein
G
10

I had exactly the same problem. the plugin you have mentioned worked only for a HTTP-like request/response but I couldn't use it for a "long" connection.

Have a look at this http://github.com/maciejzaleski/JMeter

Features:

  • Supports HTTS/HTTPS (ws/wss) version of the WebSocket protocol
  • Option to ignore SSL certificate errors
  • Streaming allows for a single connection to remain open for the duration of the test
  • Response has to match predefined regular expression
  • Response timeout
  • Response message backlog (build the Sampler response from multiple server messages)
  • Connection could be closed if server sends a message matching predefined regular expression
Gemology answered 16/1, 2014 at 21:1 Comment(0)
C
7

As of November 2017, the best Websocket Sampler for Apache JMeter is this 3rd party plugin:

It can easily be installed through jmeter-plugins plugin manager.

Casias answered 23/8, 2016 at 20:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.