First of all this mailing list is dedicated for JMeter, your question is about a custom plugin so I believe it should go to JMeter Plugins support forum <https://groups.google.com/g/jmeter-plugins> or to the plugin developer directly <https://bitbucket.org/pjtr/jmeter-websocket-samplers/issues?status=new&status=open>

Coming back to your question: it looks utterly like to be continuation of the same message consisting of the several frames.

There is Fragmentation chapter in the plugin documentation <https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/>


     Fragmentation

WebSocket messages may be fragmented into several frames. In such cases the first frame is an ordinary text or binary frame, but it will have the |final|bit cleared. The succeeding frames will be continuation frames (whether they are text or binary is inferred by the first frame) and the last continuation frame will have the |final|bit set. The plugin supports continuation frames, but as the plugin is frame-oriented, you'll have to read them yourself. In cases where the number of fragments is known beforehand, this is as easy as adding an extra WebSocketReadSampler for each continuation frame you expect. If the number of continuation frames is not known, you need to create a loop to read all the continuation frames. For this purpose, the plugin provides a new JMeter variable called |websocket.last_frame_final|that indicates whether the last frame read was final. This enables you to write a simple loop with a standard JMeter While Controller; use the expression |${__javaScript(! ${websocket.last_frame_final},)}|as condition. With a JMeter If Controller, the condition can be simplified to |! ${websocket.last_frame_final}|because that controller automatically interprets the condition as JavaScript. See the sample Read continuation frames.jmx <https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/samples/Read%20continuation%20frames.jmx>test plan for examples of using the While or the If controller to read continuation frames.

If you are unsure whether continuation frames are sent by your server or how much, switch on debug logging: samplers reading a frame will log whether the received frame is a "normal" single frame, a non-final frame (i.e. 1st fragment), a continuation frame or a final continuation frame (last fragment).

You can also check JMeter WebSocket Samplers - A Practical Guide <https://www.blazemeter.com/blog/jmeter-websocket-samplers> for more information.


On 9/15/2022 12:59 PM, Riji K wrote:
Hello All,

Good day greetings,

I'm currently working on WebSocket for a chat-bot. The WebSocket open
connection works but after that while I use WebSocket reauest-response
Sampler with proper request data, the Sampler fails with message
Response Message: Received:Close frame with status code null and close
reason 'null'.

2. While I use the same request data with WebSocket Single Write Sampler it
gets passed but no response data.

Can we get response data back in Jmeter for WebSocket?

Thanks in advance
Regards,
Riji Kunhiraman

Reply via email to