Create a WebSocket Action

This section describes how to create a WebSocket Action from scratch. To record a request using an existing client, see Record a WebSocket request.

A right-click on a Container (Transaction, page, etc.) gives access to:

A WebSocket Action is created.

Name: The default websocket_request incremented name can be modified.

WebSocket channel: Because a WebSocket Action requires a WebSocket channel, NeoLoad automatically associates the first channel found in the scenario. The associated channel is displayed as a link to access it directly in the design view. When there is no channel available or when it is necessary to assign another channel, a click on the Change channel button makes it possible to select another channel.

WebSocket type: The list box makes it possible to select the WebSocket type: Text Data or Close. The Text Data type allows sending data in a text format.
The Close type allows closing the communication channel between NeoLoad and the server.

Status code: This field is associated with the Close type. The value entered in this field allows identifying the reason for closure. "1000" is the default value used to close the communication in a standard way.

WebSocket mode: For the Text Data type, the WebSocket mode can be Synchronous or Asynchronous. In Synchronous mode, a Mapping ID must be specified to associate the server response. If a mapping ID matches one of a synchronous WebSocket request, then it is considered as the response of this request. For more information, see Create a WebSocket channel.

WebSocket request: This is the call to the WebSocket application, for example CONNECT.

  1. In the User Paths node, right-click a Container (Transaction, page, etc.), and choose:
  2. The WebSocket action is created.
  3. In Name, you can change the label of the WebSocket action.
  4. In WebSocket channel, you can select and change a channel with a click on Channel button.
  5. In the WebSocket type list box, select the type of WebSocket. If you select the Close tye, you can enter a value for the status code.
  6. Select the appropriate mode in the WebSocket mode list box. In Synchronous mode, you must enter a Mapping ID to map the server response.
  7. In WebSocket request, you can specify the calling action content.