+

Search Tips   |   Advanced Search


SIP Specifying the expected header contents

Header Content verification points report an error if the received SIP header contents differ from the expected header contents. Header Content verification points can also verify that a header with any value exists in the message.

To specify the expected header contents:

  1. In the Test Navigator, browse to the test, and double-click it.

  2. Select the Receive request or response containing the header whose content to verify. The Message Headers table opens in the Test Element Details area.

  3. Select the row of the header to contain the verification point. The Header area opens.

  4. At Header Content VP, click Edit, and then in the Edit Header Content VP window, click Enable verification point.

  5. Set Verification fails if to either At least one of the checked strings is found or to None of the checked strings are found.

  6. To create a string, click New String. To create a new string by editing another string, select the source string, and click Duplicate.

    To edit an existing string, select it and click Edit. The Text area opens so that you can set the properties of the new string.

    1. In the text box, enter the text for the string.

    2. In the text box, set the properties of the string: whether it is case sensitive, whether it contains a regular expression, and whether you want the entire string to match or a partial match.

      The most common regular expressions are .* for any number of characters, ? for any single character, and \ for an escape to enter literals. For detailed information on Java regular expressions, see the Java documentation.

      To verify that a header has arrived in the message with any value (or even with no value), use the wildcard expression .*.

    3. In the text box, click OK. The text box closes.

  7. In the list of strings in the Text column, select the strings that the Header Content verification point should search for.

  8. Click OK. The Message Headers table is updated to indicate that the header has a verification point, and, in the Test Element Contents area, the related Receive request or response icon is overlaid with a check (

    ).


Related tasks

  • Specifying the expected request methods
  • Specifying the expected response codes
  • Specifying the expected message contents