Page tree

Skip to end of metadata
Go to start of metadata

When the Diff tool is configured in either the XML or SOAP Response modes, any differences found between the actual outcome and the Diff value are expressed in XPath. XPaths represent the position of an XML element. They specify where a difference occurred, the type of difference that occurred, and whether that difference was caused by a modification, an insertion, or a deletion.

Example

For example, assume that this is your XML response:

<Response>
<Item>
<value>100</value>
<name>keys</name>
</Item>
<time>10:00</time>
<amount>50</amount>
<success>true</success> </Response>

If you ignore the XPath /Envelope/Body/Response/Item/value/, you are ignoring the <value> element. If you Ignore the XPath /Envelope/Body/Response/Item/, you are ignoring the <Item>, <value>, and <name> elements.

Therefore, if you want to diff only the <success> element, you should ignore the following XPaths:

  • /Envelope/Body/Response/Item/
  • /Envelope/Body/Response/time/
  • /Envelope/Body/Response/amount/

Tutorial

The tutorial lesson on Service Functional Testing contains a section on Ignoring XPaths.

More About XPaths in the Diff Tool

See Understanding XPaths.

  • No labels