Unanswered question

How do I set up at test for a web application containing websockets in a multiple user scenario?

I am trying to run some load tests on a web application due to be released in a few days. The web application is running on IIS 8/.NET 4.6.2 and uses SignalR/WebSockets quite extensively. I need to verify that it can handle a number of simultaneous users in a realistic scenario.

The recording tool is a really handy feature, so I recorded a simple user sequence:

  • User goes to login page, enters username and password.
  • User gets redirected to application main page where a WebSocket connection is negotiated and started.
  • User clicks on some menu items which triggers data requests through the WebSocket connection and populates the web page asynchronously.

I stepped through the Post-recording wizard which did not find any generic dynamic parameters. I then set up a simple test scenario with a couple of simultaneous users and hit the play button. After a few seconds a lot of errors appeared with the following description:

Error Code: NL-WEBSOCKET-REQUEST-ENGINE
Message: An internal error occurred while processing the WebSocket request.
Details: Connection output is closed

I turned on some debugging on the server side and found out that the test was re-using the same connection ID for all virtual users. When the user path actions triggered connects and disconnects it affected all the virtual users simultaneously and the server returned exceptions.

After looking at the static request parameters in the signalr/negotiate, signalr/connect and signalr/start it seemed clear that the script would not work in my multi-user scenario.

I guess I need to set up some dynamic parameters and mappings to get a unique WebSocket channel for each virtual user..? I read the online documentation but that did not help me too much.

Can you please provide me an example on how to set up the required user path actions to handle dynamic negotiation and connection of WebSocket channels?

Thanks in advance!

Morten F.
Morten F.

Morten F.

Level
0
3 / 100
points

Answers

Each virtual user should use a separate connection so if you have concurrency issue then it means that there are some dynamic parameters in your script that were not handled.

You need to check your script for any ID's that could come from the server. In that case you need to correlate them.

The search of dynamic parameters in NeoLoad can't find any dynamic parameters for any applications.