+

Search Tips   |   Advanced Search


Create a WebSocket channel

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. The request type can be defined in four ways:

The Advanced button gives access to further parameters and information about the channel. 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.

  1. In the Design section, select a scenario.
  2. Right-click a Container (Transaction, Loop, etc.) and choose:

    • Insert after > WebSocket Channel, or
    • Insert as child > WebSocket Channel.

    The WebSocket channel is created.

  3. In Request type, select the type of the channel request.
  4. In the Definition group box, configure the channel request.
  5. Click Advanced to configure the channel further.


Home