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
-
From the Toolbox pane, add a test step with XML output, such as String to XML.
-
In the Properties pane, select the Input/Checkpoints tab .
-
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.
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 selected. If you plan to validate against a fully qualified expression, or if you need to specify a namespace prefix, clear this option.
Add an XPath checkpoint
-
In the XPath tab, click the Add button .
-
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.
-
-
Select the checkbox in the Validate column, select a comparison operator, and provide an expected value.