fshutdown / JMeter-WebSocketSampler

JMeter - WebSocket Sampler
Apache License 2.0
313 stars 186 forks source link

How to receive continuous websocket response messages from server? #41

Open peer2peer opened 9 years ago

peer2peer commented 9 years ago

In my scenario, I set up a websocket connection from JMeter to server. Then JMeter-WebSocketSampler send a text request in WebSocket to the server and the server will response the request with many continuous messages in WebSocket.

Now I have successfully received the 1st response message but then the WebSocketSampler thread and the threadgroup both end.

So my question is how to set up a test plan which could enable me receiving the continuous response messages from the websocket server.

peer2peer commented 9 years ago

I added more websocket samplers without any messages sent out. Then one sampler will receive one following response. The issue is fixed partly but not perfect because I may have more following responses without ending.

e.g., sampler1: A --> B req 1 sampler2: A <-- B resp 1 sampler3: A <-- B resp 2 sampler4: A <-- B resp 3 ... ...

peer2peer commented 9 years ago

An improvement:

add a loop controller to loop a sampler for receiving the response message in loop.

e.g., sampler1: A --> B req 1 sampler2: A <-- B resp 1 sampler3: A <-- B resp 2 loop: sampler4: A <-- B resp 3

yxt105926 commented 7 years ago

I got the same issue , I use loop too.... any improvement ? thx~