Add contain verification points

 

+

Search Tips   |   Advanced Search

 

Overview

Contain verification points enable you to check that part of the contents that are returned by a service match the contents specified in the verification point. When you add verification points, the results from a service message return are compared with the expected data specified in the verification point test element. Equal or contain verification points enable you to directly compare the XML contents that the service returns.


Add a contain verification point to a test

  1. Open the test editor, and select a service message return element.

  2. In the Test Element Details area, click the Message tab and select the Tree view.

  3. Expand the envelope line, right click the element to check, and then select Create contain verification point.

    This creates a contain verification point including details from the recorded message return element.

  4. Select the verification point, and in the Test Element Details area, type a name for the verification point.

  5. Select the verification options:

    • Select Test using XML namespaces to perform the verification on the qualified structure of the XML document, including the namespace tagging, instead of the simple name.

      Disable this option to check only the simple name of the element and the final return value.

    • Select Text XML text nodes to include the content of text elements in the verification.

    • Select Text XML attributes to include the content of attributes in the verification.

  6. On the Message page, select the Form, Tree, or Source view to specify the expected XML data.

    For an equal verification point, the expected XML data contains the XML document from the message return test element.

    If necessary, you can edit the expected XML data.

    You can specify standard Java regular expressions in the Tree view.

    To do this, select the Regular expression column on the line of an attribute or text value and type the regular expression in the Value column.

    For example, the following regular expression checks for a correctly formatted email address:

      /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/


What to do next

You can enable or disable each service verification point by clicking Enable verification point in the test editor.


Related tasks

  • Add equal verification points
  • Add Xpath query verification points
  • Add attachment verification points