Verifying received content
With content verification points, you can check that actual received data matches the expected data that is specified in the verification point.
About this task
When you add verification points, the received data is compared with the expected data that is specified in the verification point test element. With content verification points enable, you can directly compare the content data that the server returns and return a Pass status when the criteria is met.
Procedure
To add a content verification point to a socket test:
- Open the test editor, right click a socket receive element, and select .
- Select the verification point, and in the Test
Element Details area of the test editor, specify the verification
criteria:
- Comparison operator
- Specify the criteria to use to perform the verification, among
the following operators:
- Equals
- The verification point returns a Pass status if the received data exactly matches the text or binary content that is specified in the Data area.
- Contains
- The verification point returns a Pass status if the text or binary content that is specified in the Data area occurs at least once in the received data.
- Starts with
- The verification point returns a Pass status if the text or binary content that is specified in the Data area occurs at the beginning of the received data.
- Ends with
- The verification point returns a Pass status if the text or binary content that is specified in the Data area occurs at the end of the received data.
- Differs from
- The verification point returns a Pass status if the received data does not exactly match the text or binary content that is specified in the Data area.
- Does not contain
- The verification point returns a Pass status if the text or binary content that is specified in the Data area does not occur at least once in the received data.
- Does not start with
- The verification point returns a Pass status if the text or binary content that is specified in the Data area does not occur at the beginning of the received data.
- Data
- Specify the data that is expected to be received through the connection.
- Binary
- In this view, edit the expected content as binary data.
- Raw ASCII
- In this view, edit the expected content as raw ASCII data. Bytes are expressed as 7-bit alphanumeric characters or two-digit hexadecimal bytes preceded with \x. Additionally, \r and \n stand for carriage-return and line-feed, while \\ represents the backslash character.