Set XPath checkpoints

Relevant for: API testing only

This task describes how to validate your test results against XPath expressions.

Add a step with XML output

  1. From the Toolbox pane, add a test step with XML output, such as String to XML.

  2. In the Properties pane, select the Input/Checkpoints tab .

  3. In the Value column for a step property, paste a source string or use the Link to data source button to link to a value.

Back to top

Set the namespace setting

In the bottom of the Input/Checkpoints tab, click the XPath tab, and indicate whether or not to ignore namespaces.

By default, the Ignore namespaces option is enabled. If you plan to validate against a fully qualified expression, or if you need to specify a namespace prefix, disable the option.

Back to top

Add an XPath checkpoint

  1. In the XPath tab, click the Add button .

  2. Type or paste the expression into the XPath Checkpoints column:

    • To retrieve a simple XPath, click in the Value column, and select Copy XPath from the shortcut menu.

    • To retrieve a complete qualified XPath, click in the Value column, and select Copy Fully Qualified XPath from the shortcut menu.

  3. Select the check box in the Validate column, select a comparison operator, and provide an expected value.

Back to top