chrisexv6
10 years agoNew Contributor
Question about XPath Expression assertion
Im using an XPath Expression assertion to compare the response values from 2 webservices (old vs new)
Since the results should match exactly, I just made the XPath compare the whole response tree. But I have a question about what happens if it fails "early"
The response looks like this:
<NewDataSet xmlns="">
<Table diffgr:id="Table1" msdata:rowOrder="0">
<Field1>2014-01-31T23:11:14.203-05:00</Field1>
<Field2></Field2>
<Field3></Field3>
<Field4></Field4>
</Table>
<Table diffgr:id="Table2" msdata:rowOrder="1">
<Field1>2014-01-31T23:11:14.203-05:00</Field1>
<Field2></Field2>
<Field3></Field3>
<Field4></Field4>
</Table>
.....
</NewDataSet>
We're noticing there is a difference in return value for Field1 across the 2 webservices.
My question is - does processing of the assertion stop completely once it finds a difference? Or does it compare the whole response and show ALL differences? If Field3 has a difference, would the assertion show Field1 AND Field3 as not matching? (in the Assertion tab)
Thanks in advance.
-Chris
Since the results should match exactly, I just made the XPath compare the whole response tree. But I have a question about what happens if it fails "early"
The response looks like this:
<NewDataSet xmlns="">
<Table diffgr:id="Table1" msdata:rowOrder="0">
<Field1>2014-01-31T23:11:14.203-05:00</Field1>
<Field2></Field2>
<Field3></Field3>
<Field4></Field4>
</Table>
<Table diffgr:id="Table2" msdata:rowOrder="1">
<Field1>2014-01-31T23:11:14.203-05:00</Field1>
<Field2></Field2>
<Field3></Field3>
<Field4></Field4>
</Table>
.....
</NewDataSet>
We're noticing there is a difference in return value for Field1 across the 2 webservices.
My question is - does processing of the assertion stop completely once it finds a difference? Or does it compare the whole response and show ALL differences? If Field3 has a difference, would the assertion show Field1 AND Field3 as not matching? (in the Assertion tab)
Thanks in advance.
-Chris