问题
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.
回答1:
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
):
- ApacheJmeter_websocket-0.1.0-SNAPSHOT.jar
- ApacheJmeter_websocket-dist-0.1.0-SNAPSHOT.jar - with dependencies.
WebSocket Sampler available in the list of Samplers:
回答2:
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
回答3:
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.
回答4:
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 :)
回答5:
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.
来源:https://stackoverflow.com/questions/16152648/websocket-plugin-for-jmeter