I've a website using Asp.NET Core SignalR to dynamically load data from the server.
I use JMeter to do functional tests on this page. I use the WebSocket sampler plugin in version 1.2.1 to test the SignalR functionality.
Following this blazemeter tutorial on how to use JMeter with the WebSocket sampler plugin I get always an error when trying to close the SignalR connection.
My JMeter sampler setup looks like:
- WebSocket Open Connection
- WebSocket request-response Sampler
- WebSocket Single Read Sampler
- WebSocket Close
For closing the connection I use the WebSocket sampler called WebSocket Close
. This sampler allows to provide a Close status
.
I've tried to provide different Close status
codes. But non of the provided codes actually got confirmed and always the error message was returned:
Response code: WebSocket error: unsuccesful close.
Response message: WebSocket error: received not a close frame, but Text frame with text ...
How can I properly close this connection in JMeter?
Update
I've figured out that it depends on how many samplers I use. If I use a write sampler before the read sampler the close seems to work. Like:
- WebSocket Open Connection
- WebSocket request-response Sampler
- WebSocket Single Read Sampler
- WebSocket Single Write Sampler
- WebSocket Close
But if I want to have more then one read sampler it doesn't work. Any idea how I properly use multiple read sampler?
Update 2
I've re-read the Plugins documentation and also checked the sample JMeter files here. Unfortunately I haven't found a bigger sample with multiple Read Samplers so far.