A WebSocket action must be linked to a WebSocket channel to be replayed. A WebSocket channel is linked to an HTTP server: WebSocket is an upgrade of an HTTP request. A WebSocket channel can be created from the ground up, or recorded using an existing client as described in Record a WebSocket request.
In the Design section, a right-click on a Container or page tree item gives access to:
A WebSocket channel is created with a default
websocket_channel incremented name.
The WebSocket channel properties panel contains information about the channel and the HTTP request.
Name: enter a label to uniquely identify the WebSocket channel in NeoLoad.
Description: if needed, enter a description of the WebSocket channel.
The HTTP request depends on the selected type of request. The Request type drop-down list makes it possible to select a type of request and updates the Definition group box. There are 4 ways to define a request type:
Submit a form from the previous request. Extracts and submits a form from a form in the previous request. This option is useful when a scenario includes the submission of a form containing a dynamic hidden field. The form is dynamically extracted from the results of the preceding request (referrer), allowing the dynamically-extracted values to be submitted. For more information, see Submit a form from the previous request.The Advanced button gives access to further parameters and information about the channel. For more information, see Advanced parameters.
The Advanced screen contains the Messages mapping tab to specify the XPath or regular expression to extract the mapping ID from the WebSocket responses.
The expressions will be applied on all messages received on the channel in order to extract a mapping ID. If a mapping ID matches the one of a synchronous WebSocket request, then it is considered as the response of this request. A WebSocket channel can define only one way to extract the mapping ID from the response, so the XPath or regular expression has to be generic enough to handle all responses.
The WebSocket channel is created.