-
Notifications
You must be signed in to change notification settings - Fork 187
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
Added support for headers and cookies in WebSocket upgrade request #22
base: master
Are you sure you want to change the base?
Conversation
Hi Vadim, Appreciate for adding cookies and headers stuff into client upgrade request. Could you please tell me who surrounds cookies send in upgrade request with quotes? Have you faced with similar problem and what did you do? Thanks. |
Nope - I have not seen this happening. From what I can tell, the HTTP Cookie Manager faithfully preserves the cookie value as it was sent in the server response. The CookieStore created by the code I've just added does not add quotes either. The server I am using does not received the cookie values quoted. The only thing I can think of is that the server itself sends the values quoted to be begin with. You can try to debug this using something like WireShark. |
Found the problem. Fortunately, you used exactly HttpCookie object inside modified WebSocketSampler code so I'm just simly calling the method setVersion(0) every time I add cookie to cookieStore. It took me a day to find it out but now ... I'm happy. Thanks again for this improvement! P.S. Do not want to commit code here as it may affect someone in other environemnts. HttpCookie tmpCookie = new HttpCookie(cookieManager.get(i).getName(),cookieManager.get(i).getValue());
|
I've incorporated your cookie version suggestion using the existing version data maintained by CookieManager. |
…et upgrade response
If a sampler reuses a streaming websocket created by some earlier sampler, the new sampler's parameters are picked up
hi, tradingscreen! |
Hello. |
Hi. I’ve added ZIPped JAR file at the root of source tree. From: paldaz [mailto:[email protected]] Hello. — |
Thanks tradingscreen 👍 |
Hello, |
Websocket sampler does not manage headers (nor cookies) itself. Websocket sampler just obeys the same rules that any sampler should and picks up headers from the standard JMeter "HTTP Header Manager" and cookies from "HTTP Cookie Manager". Take a look at JMeter manual to see how these work. |
thank you for the answer |
@tradingscreen is it possible to send these message using this sampler? Thanks in advance. |
You can have a "loop" with a "pause" set to 1s and the websocket sampler that has the JSON in "Request data" field. You can use regular expression extractor to pull whatever values you may need from the server messages coming over the websocket. |
I would also recommend looking at mkaczara/JMeter-WebSocketSampler repository as it pulled in the fixes from this repository as well as added a bunch of other improvements |
@tradingscreen Thank you Sir. It is working fine. |
hi, tradingscreen! |
Please, take a look at the Feb 13 and Aug 14 comments. |
I am working on Signalr, This is my project requirement hence downloaded websocket version websocket-9.1.1.v20140108, I dont have a good knowledge on JAVA. I am using maciejzaleski websocket sampler in JMeter First time. After a lot of r&d I success to communicate with Signalr via your Websocket sampler. Now my project build got upgraded & they are passing a Cookie Data: I have gone through all above comments. As I told I can rate myself 1 outof 10 in JVAV. Could you please let me know or send me the required websocket JAR file which handles cookies @ [email protected]. Or any guide line also help me...Please Thanks In Advance. |
I'm sorry to reply to you so long ago,Because I saw your mail today.You need the websocket JAR file inside the attachment,about http request cookie I Suggest you
added in front of the thread group,Do not know can help you solve your problem.
good luck!
[email protected]
From: ChittaRanjan1981
Date: 2017-02-13 13:14
To: maciejzaleski/JMeter-WebSocketSampler
CC: angelqing; Comment
Subject: Re: [maciejzaleski/JMeter-WebSocketSampler] Added support for headers and cookies in WebSocket upgrade request (#22)
@tradingscreen
I am working on Signalr, This is my project requirement hence downloaded websocket version websocket-9.1.1.v20140108, I dont have a good knowledge on JAVA. I am using maciejzaleski websocket sampler in JMeter First time. After a lot of r&d I success to communicate with Signalr via your Websocket sampler. Now my project build got upgraded & they are passing a Cookie Data:
.ASPXAUTH=0AE3BF3FE55AAADC5FFEAFE1120F1E45B84AC2C7D227BC8F8E1585E74D14852798F5D27B688D4AFC2C1E494263077178ECBAFC126F4D7D258A21F258779B4B9749BE9D819C51FCBE7D116691F2020FC8EABE622396AA80201872F5C671009EBB in each (Http & WS) request. Via Jmeter cookie manager in each http request cookie handled correctly & requests were passing but my Websocket requests were failing because its not passing the Cookie data.
I have gone through all above comments. As I told I can rate myself 1 outof 10 in JVAV.
Could you please let me know or send me the required websocket JAR file which handles cookies @ [email protected].
Or any guide line also help me...Please
Thanks In Advance.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks for your reply.. Attached Jar is not working for my signalr request. I already added HTTP cookie manager & Header manger with the test plan. Could you please let me know is there any extra configuration required. In view result tree I can observe no cookie is passing. You have a release on Feb 13 & In Oct in GIT. The latest release on October don't have any jar why? Feb 13 jar is not working for me with SignalR.. |
Don't have any jar file attached along with this mail. Please Pass me
the jar which support websocket cookie.
…On 2/15/2017 7:07 AM, angelqing wrote:
I'm sorry to reply to you so long ago,Because I saw your mail
today.You need the websocket JAR file inside the attachment,about http
request cookie I Suggest you
added in front of the thread group,Do not know can help you solve your
problem.
good luck!
***@***.***
From: ChittaRanjan1981
Date: 2017-02-13 13:14
To: maciejzaleski/JMeter-WebSocketSampler
CC: angelqing; Comment
Subject: Re: [maciejzaleski/JMeter-WebSocketSampler] Added support for
headers and cookies in WebSocket upgrade request (#22)
@tradingscreen
I am working on Signalr, This is my project requirement hence
downloaded websocket version websocket-9.1.1.v20140108, I dont have a
good knowledge on JAVA. I am using maciejzaleski websocket sampler in
JMeter First time. After a lot of r&d I success to communicate with
Signalr via your Websocket sampler. Now my project build got upgraded
& they are passing a Cookie Data:
.ASPXAUTH=0AE3BF3FE55AAADC5FFEAFE1120F1E45B84AC2C7D227BC8F8E1585E74D14852798F5D27B688D4AFC2C1E494263077178ECBAFC126F4D7D258A21F258779B4B9749BE9D819C51FCBE7D116691F2020FC8EABE622396AA80201872F5C671009EBB
in each (Http & WS) request. Via Jmeter cookie manager in each http
request cookie handled correctly & requests were passing but my
Websocket requests were failing because its not passing the Cookie data.
I have gone through all above comments. As I told I can rate myself 1
outof 10 in JVAV.
Could you please let me know or send me the required websocket JAR
file which handles cookies @ ***@***.***
Or any guide line also help me...Please
Thanks In Advance.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYisqNg1QaEJVKHWSDM7rHz1hybigg3iks5rclb1gaJpZM4ByXwO>.
--
Warm Regards,
Chitta Ranjan
Module Lead
cid:[email protected]
Millennium City Information Technology Park, Tower II, Floor - Floor – 9th/14th
Sector V, Salt Lake, Kolkata - 700091, India
Tel. +91 33 4041 8100 Ext: 145
www.mindteck.com
cid:[email protected]
cid:[email protected] cid:[email protected] cid:[email protected] cid:[email protected]
Disclaimer: This message is for the named recipient(s) above and may contain confidential, proprietary or
legally privileged information of MINDTECK. If you have received this message in error, please immediately
delete all copies of it, and notify the sender. Do not disseminate this message to anyone if you are not the
intended recipient.
ü SAVE PAPER - SAVE TREES! THINK BEFORE YOU PRINT.
Please do not print this email unless it is absolutely necessary.
|
@tradingscreen <https://github.com/tradingscreen>
I am expecting a JMeter-WebSocketSampler jar, which support cookie for
real time communication with SignalR. In your last mail I don't find any
attachment. I tried with the one
#22 that
also not working for me.
Thanks
Chitta Ranjan
…On 2/15/2017 7:07 AM, angelqing wrote:
I'm sorry to reply to you so long ago,Because I saw your mail
today.You need the websocket JAR file inside the attachment,about http
request cookie I Suggest you
added in front of the thread group,Do not know can help you solve your
problem.
good luck!
***@***.***
From: ChittaRanjan1981
Date: 2017-02-13 13:14
To: maciejzaleski/JMeter-WebSocketSampler
CC: angelqing; Comment
Subject: Re: [maciejzaleski/JMeter-WebSocketSampler] Added support for
headers and cookies in WebSocket upgrade request (#22)
@tradingscreen
I am working on Signalr, This is my project requirement hence
downloaded websocket version websocket-9.1.1.v20140108, I dont have a
good knowledge on JAVA. I am using maciejzaleski websocket sampler in
JMeter First time. After a lot of r&d I success to communicate with
Signalr via your Websocket sampler. Now my project build got upgraded
& they are passing a Cookie Data:
.ASPXAUTH=0AE3BF3FE55AAADC5FFEAFE1120F1E45B84AC2C7D227BC8F8E1585E74D14852798F5D27B688D4AFC2C1E494263077178ECBAFC126F4D7D258A21F258779B4B9749BE9D819C51FCBE7D116691F2020FC8EABE622396AA80201872F5C671009EBB
in each (Http & WS) request. Via Jmeter cookie manager in each http
request cookie handled correctly & requests were passing but my
Websocket requests were failing because its not passing the Cookie data.
I have gone through all above comments. As I told I can rate myself 1
outof 10 in JVAV.
Could you please let me know or send me the required websocket JAR
file which handles cookies @ ***@***.***
Or any guide line also help me...Please
Thanks In Advance.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYisqNg1QaEJVKHWSDM7rHz1hybigg3iks5rclb1gaJpZM4ByXwO>.
--
Warm Regards,
Chitta Ranjan
Module Lead
cid:[email protected]
Millennium City Information Technology Park, Tower II, Floor - Floor – 9th/14th
Sector V, Salt Lake, Kolkata - 700091, India
Tel. +91 33 4041 8100 Ext: 145
www.mindteck.com
cid:[email protected]
cid:[email protected] cid:[email protected] cid:[email protected] cid:[email protected]
Disclaimer: This message is for the named recipient(s) above and may contain confidential, proprietary or
legally privileged information of MINDTECK. If you have received this message in error, please immediately
delete all copies of it, and notify the sender. Do not disseminate this message to anyone if you are not the
intended recipient.
ü SAVE PAPER - SAVE TREES! THINK BEFORE YOU PRINT.
Please do not print this email unless it is absolutely necessary.
|
I've a problem with this plugin. It seems to be a race condition.
Error Message:
Can you advise? |
I have one question. |
Hi,
Please try the available JMeter WebSocket Samplers available at
https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/ed555a0f4b5b07855b8061605ac72617d745a176/samples/?at=master
It must resolve your issue.
…On 5/5/2017 2:17 PM, buaban wrote:
I've a problem with this plugin. It seems to be a race condition.
When I subscribe a service via websocket. my service returns 2 messages.
The problem occurs when these 2 messages came at the same time. There
is an error at WebSocketSampler.java, method: "sample" at the lines below:
|if (socket.getResponseMessage() == null || socket.getResponseMessage().isEmpty()) {
sampleResult.setResponseCode("204");
}
|
Error Message:
[Problems]
|- Unexpected error: null
java.util.LinkedList$ListItr.checkForComodification(Unknown Source)
java.util.LinkedList$ListItr.next(Unknown Source)
JMeter.plugins.functional.samplers.websocket.ServiceSocket.getResponseMessage(ServiceSocket.java:106)
JMeter.plugins.functional.samplers.websocket.WebSocketSampler.sample(WebSocketSampler.java:155)
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:465)
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:410)
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:241)
java.lang.Thread.run(Unknown Source)
|
Can you advise?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYisqHNGGuo9AX3c3ssEvgQXlnC_1hK4ks5r2uIegaJpZM4ByXwO>.
--
Regards,
Chitta Ranjan*
*/Module Lead /*
*
cid:[email protected] <http://www.mindteck.com/>
Millennium City Information Technology Park,
Tower II, 9C, Sector V, Salt Lake, Kolkata 700091, India.
Tel. +91 33 4041 8100; Ext. 157
www.mindteck.com <http://www.mindteck.com/>
cid:[email protected]
/cid:[email protected]/
<http://www.jobs.net/jobs/mindteck/join?joinpath=Extportablejoin>cid:[email protected]
<https://www.linkedin.com/company/mindteck>cid:[email protected]
<https://www.facebook.com/Mindteckglobal/>cid:[email protected]
<https://twitter.com/mindteck?lang=en>
*/Disclaimer: /*/This message is for the named recipient(s) above and
may contain confidential, proprietary or legally privileged information
of MINDTECK. If you have received this message in error, please
immediately delete all copies of it, and notify the sender. Do not
disseminate this message to anyone if you are not the intended recipient./
|
No description provided.