Comments (7)
The HTTP to WebSocket protocol upgrade is a part of the sampler code so I'm not sure whether you need both in your scrtipt.
WebSocket sampler will return response with message index marker like this:
[Message 1]
MySessionIdNumberIsHere
I would imagine that you RexEx pattern (^.*) would match only the first line (i.e. [Message 1])
The following expression will be better siuted:
\[Message 1\]\s(.*)
from jmeter-websocketsampler.
"The HTTP to WebSocket protocol upgrade is a part of the sampler code so I'm not sure whether you need both in your script"
In the line above, are you referring to Http request sampler and websocket sampler when you say both?
I just replayed the jmeter test script and this is what I found in the response tab of view Results Tree for the first socket io request (http://host:8085/socket.io/1/%3Et=1392300599780:
6WIKeXU5vvqqyVYcaa1E:60:60:websocket,htmlfile,xhr-polling,jsonp-polling
I did not see the message index marker...
I tried the expression you suggested but same result as before. Request failed and view Results Tree shows nothing in request and response tabs.
I saw this in the Sampler results:
Thread Name: WebSocketTest3 1-1
Sample Start: 2014-02-13 09:10:00 EST
Load time: 25053
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 0
Response code: 200
Response message:
[Execution Flow]
- Opening new connection
- Using response message pattern ""
- Using disconnect pattern ""
- Waiting for the server connection for 5000 MILLISECONDS
- Cannot connect to the remote server
- Waiting for messages for 20000 MILLISECONDS
- WebSocket conection closed by the client
[Variables]
- Message count: 0
Not sure if there is anything helpful there...
Thanks.
On Thursday, February 13, 2014 4:54 AM, Maciej Zaleski [email protected] wrote:
The HTTP to WebSocket protocol upgrade is a part of the sampler code so I'm not sure whether you need both in your scrtipt.
WebSocket sampler will return response with message index marker like this:
[Message 1]
MySessionIdNumberIsHere
I would imagine that you RexEx pattern (^.) would match only the first line (i.e. [Message 1])
The following expression will be better siuted:
[Message 1]\s(.)
—
Reply to this email directly or view it on GitHub.
from jmeter-websocketsampler.
Hi,
I added HTTP cookie manager in the thread group so cookie handling is automatic for all http requests. However would this work for the websocket sampler request? If it does not, how can I handle it manually for this request?
Thanks.
On Thursday, February 13, 2014 9:33 AM, Thara Vadakkeveedu [email protected] wrote:
"The HTTP to WebSocket protocol upgrade is a part of the sampler code so I'm not sure whether you need both in your script"
In the line above, are you referring to Http request sampler and websocket sampler when you say both?
I just replayed the jmeter test script and this is what I found in the response tab of view Results Tree for the first socket io request (http://host:8085/socket.io/1/%3Et=1392300599780:
6WIKeXU5vvqqyVYcaa1E:60:60:websocket,htmlfile,xhr-polling,jsonp-polling
I did not see the message index marker...
I tried the expression you suggested but same result as before. Request failed and view Results Tree shows nothing in request and response tabs.
I saw this in the Sampler results:
Thread Name: WebSocketTest3 1-1
Sample Start: 2014-02-13 09:10:00 EST
Load time: 25053
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 0
Response code: 200
Response message:
[Execution Flow]
- Opening new connection
- Using response message pattern ""
- Using disconnect pattern ""
- Waiting for the server connection for 5000 MILLISECONDS
- Cannot connect to the remote server
- Waiting for messages for 20000 MILLISECONDS
- WebSocket conection closed by the
client
[Variables]
- Message count: 0
Not sure if there is anything helpful there...
Thanks.
On Thursday, February 13, 2014 4:54 AM, Maciej Zaleski [email protected] wrote:
The HTTP to WebSocket protocol upgrade is a part of the sampler code so I'm not sure whether you need both in your scrtipt.
WebSocket sampler will return response with message index marker like this:
[Message 1]
MySessionIdNumberIsHere
I would imagine that you RexEx pattern (^.) would match only the first line (i.e. [Message 1])
The following expression will be better siuted:
[Message 1]\s(.)
—
Reply to this email directly or view it on GitHub.
from jmeter-websocketsampler.
By the look of things the sampler did not manage to establish a WebSocket connection with the server. There could be few things here:
- You are using incorrect protocol; only ws and wss can be used which is equivalent of HTTP and HTTP respectively
- There are problems with the server certificate;; use Ignore SSL certificate errors to get around this problem
- You cannot connect directly without going through the proxy
- The server is using WebSocket implementation not supported by this sampler; currently only RFC6455 is supported
Rerarding cookies you will have to handle this manually for now. You can add header called Cookie with cookie values in the WebSocket sampler
Example:
Cookie: name=value; name2=value2
from jmeter-websocketsampler.
Thank you.
I am using ws and not wss. This is the protocol to use.
I can connect directly without going through the proxy.
Not sure what websocket implementation my server is using. I am looking into it.
I tried to handle the cookie manually,debug sampler shows the variable carrying the right value, but I get an error when replaying this socket.io request. In view results tree, request tab is empty and response tab shows 7:::1+0
Thanks.
from jmeter-websocketsampler.
We had similar issue and solved it upgrading Java VM 1.7 -> 1.8
from jmeter-websocketsampler.
I am getting same response "7:::1+0" even After changing the Protocol to WSS and Upgrading to JAVA 1.8
[Execution Flow]
- Opening new connection
- Using response message pattern ""
- Using disconnect pattern ""
- Waiting for the server connection for 20000 MILLISECONDS
- WebSocket conection has been opened
- Connection established
- Received message #1 (7 bytes); matched response pattern
- Waiting for messages for 800000 MILLISECONDS
- Leaving streaming connection open
Here is my Sampler configuration:
Path: socket.io/1/websocket/${socid}
Connection ID: ${socid}
Request DATA: 5:::{"name":"join","args":["Ag_10","${GUID}"]}
Response Pattern: (Blank)
Close Connection Pattern: (Blank)
What could I have missed? If anyont know Please do let me know...I am new at this Websocket thing so looking for help
from jmeter-websocketsampler.
Related Issues (20)
- Websocket testing JMeter Configuration
- extract().response() not working for REST assured. Getting error as "The method extract() is undefined for the type"
- How to identify disabled elements in dropdown in selenium with java? HOT 1
- WebSocket can't connect to remote server HOT 1
- Failing under heavy load HOT 4
- HTTP Header Manager parameters not passed
- Creating more threads on server than specified.
- can't receive expected response message for expected sampler
- Unable to create new connections per iteration- websocket sampler HOT 1
- Cannot get all data for frame
- excuse me?
- Unexpected error: null when run multiple threads
- WebSocket Sampler hangs on for 5000ms HOT 1
- Only the response pattern from first sampler is used
- java.util.LinkedList$ListItr.checkForComodification(Unknown Source)
- weird resizing of config window HOT 3
- WebSocket Connection "Got unexpected status 503"
- issue that i can't explain, on websocket sampler, the jmeter screen keeps on getting wider and wider HOT 4
- Able to connect to socket, but only getting sids and not message I expect
- unable send subprotocols in ws request
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmeter-websocketsampler.