+

Search Tips   |   Advanced Search


Socket receive details

In the test editor, socket receive elements represent the reception of data from the server.

Connection

Specifies the socket connection used to receive the data. Click the link to navigate to the socket connection test element.

Think Time (ms)

Specify the programmatically-calculated time delay that is observed before executing the current test element. Think time is a statistical emulation of the amount of time actual users spend reading or thinking before performing an action.

Response Timeout

The maximum delay to receive the first byte of the response. If no data is received before the end of the response timeout delay, the receive action produces an error in the test log. The response timeout counter starts when the receive action starts after the think time; the counter is interrupted when the first byte is received.

End Policy

This specifies when to stop receiving data and to move on to the next test element.

  • Detects inactivity: The receive action stops when no bytes are received from the connection after a delay specified in Inactivity threshold (in milliseconds). After this delay, the remote computer has finished sending the response and is considered inactive. This is the default setting.

  • Receives exact number of bytes: The receive action stops when the recorded number of bytes is received. Specify a Timeout (in seconds) after which the receive action produces an error in the test log, if the correct number of bytes is not received. If Link data size is enabled, the receive action expects the number of bytes displayed in the Data area. If Link data size is disabled, the receive action expects the number of bytes displayed in Bytes.

  • Receives until end of stream: The receive action stops when the connection is closed by the remote computer. If Accepts empty response is selected, then the reception of a single byte is not required and the Response Timeout is ignored. Specify a Timeout (in seconds) after which the receive action produces an error in the test log, if the correct number of bytes is not received.

  • Matches a string: The receive action stops when a specified sequence of bytes is received. Specify a Timeout (in seconds) after which the receive action produces an error in the test log, if the correct number of bytes is not received.

  • Recognizes a regular expression: The receive action stops when a sequence of bytes that matches a regular expression is received. Specify a Timeout (in seconds) after which the receive action produces an error in the test log, if the correct number of bytes is not received.

For end policies that have a Timeout setting, this setting specifies a delay (in seconds) after which the receive action produces an error in the test log if the end policy criteria is not met. The timeout counter starts when the first byte is received.

Except when the Receives until end of stream policy is in force, receive actions produce an error in the test log when the connection is closed by the remote computer.

Data

Specify the data that is received through the connection. Bytes are expressed as 7-bit alphanumeric characters or two-digit hexadecimal bytes preceded with \x. Additionally, \r and \n respectively stand for carriage-return and line-feed, while \\ represents the backslash character.

Link data size

When Receives exact number of bytes is selected as the End Policy, if Link data size is enabled, the receive action expects the number of bytes displayed in the Data area. If the option is disabled, the receive action expects the number of bytes displayed in Bytes.

Bytes

When Link data size is disabled, this specifies the number of bytes expected as data through the connection.


Related tasks

  • Add a socket receive element


    Related reference

  • Socket test details
  • Socket connection details
  • Socket close details
  • Socket send details
  • Socket content verification point details
  • Socket size verification point details
  • Socket custom verification point details