WebSocket plugin for Jmeter [closed]
Asked Answered
G

5

10

Can someone share me a link with plugin sampler for Websocket protocol for JMeter?

I tried to install from the link below: https://github.com/kawasima/mod_proxy_websocket.
But not sure how to get that.

I am new to the tool.
Thanks and appreciated.

Galilee answered 22/4, 2013 at 17:2 Comment(0)
D
21

Link in your question looks to be not for jmeter plugin but for proxying module for Apache http server.
Correct link seems to be https://github.com/kawasima/jmeter-websocket - jmeter plugin for WebSocket protocol.

To use it you have to:

  • download project sources;
  • build ApacheJMeter_WebSocket.jar using maven;
  • place jar into $JMETER_HOME/lib/ext/ dir.

Jar files successfully built from sources using maven 3.0 (mvn validate compile package):

WebSocket Sampler available in the list of Samplers:

enter image description here

Demineralize answered 22/4, 2013 at 18:19 Comment(0)
A
6

Here is another WebSocket plugin for JMeter. It supports the RFC6455 (v13) of the WebSocket protocol.

Link: https://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
Alurd answered 16/1, 2014 at 19:2 Comment(6)
Could you please add Ant/Maven/Ivy/whatever build system configuration so the one could build a jar from sources?Ergo
I know I will have to do this at some point when I get some time. There is already build JAR under Releases which you can download and put into JMeter lib/ext folder. You will also need dependencies as per Wiki page.Alurd
Maciej: your jar file didn't seem to work for me, can you help?Frutescent
I'm receiving following on attempt to use your plugin: - Unexpected error: null JMeter.plugins.functional.samplers.websocket.ServiceSocket.sendMessage(ServiceSocket.java:131) JMeter.plugins.functional.samplers.websocket.WebSocketSampler.sample(WebSocketSampler.java:102) org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429) org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257) java.lang.Thread.run(Thread.java:744)Ergo
I suspect that there was either a connection problem (incorrect host name) or a race condition. In either case the problem should now be fixed and additional messages should shed more light on the problem. I will shortly release update on GitHub The sampler will show diagnostic messages when opened in the Results tree.Alurd
Thanks a lot Maciej, version 1.0.1 works like a charm.Ergo
B
4

Here is another (fairly new) JMeter WebSocket plugin: https://bitbucket.org/pjtr/jmeter-websocket-samplers.

See the readme for current features; it's still in active development.

Bibliotaph answered 23/11, 2016 at 21:20 Comment(0)
Z
2

I can`t comment previous post. But this plugin has one problem with concurency when running a large quantity of threads. I got this error:

[Problems]
 - Unexpected error: null
java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953)
java.util.LinkedList$ListItr.next(LinkedList.java:886)
JMeter.plugins.functional.samplers.websocket.ServiceSocket.getResponseMessage(ServiceSocket.java:125)
JMeter.plugins.functional.samplers.websocket.WebSocketSampler.sample(WebSocketSampler.java:156)
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
java.lang.Thread.run(Thread.java:744)

So I just replaced one line in the ServiceSocket.java:

protected Deque<String> responeBacklog = new LinkedList<String>();

with this line:

Queue<String> responeBacklog = new ConcurrentLinkedQueue<String>();

It solved my problem :)

Zama answered 10/4, 2014 at 11:50 Comment(1)
Where is that file located?Laurelaureano
F
0

If you are new to Jmeter you dont need to spend a lot of time learning the Jmeter UI and function to do the websocket load testing. We have a dedicated tool now to do load testing on websockets. It is named as Thor.

Thanks to the developers for making it simple, light weight and opensource.

Forelady answered 7/10, 2015 at 13:13 Comment(1)
Thor has a problem of closing the websocket conenction and not able to keep it idle. Loadtesting is difficult to acheive.Witchhunt

© 2022 - 2024 — McMap. All rights reserved.