One of the cases with building good automated testing tool is to be able to compare docuiments correcly and find the diferences that matters. It is pretty simple to set an ignore expression or as SAP PIT calles it an excemption.
And ignore expression is an Xpath in case of XML documents. It will then ignore any differences between the two documents found here. You will then be able to focus on the errors that really matters.
For a client project we got some differences that looked like the following. I have just simplified the document
As seen there is a new Item field in line no 1 of the document. Then on line 3 there is a difference in the number of decimals. And Line no 4 has a real difference in the quantity.
In many cases a missing element is the same as a blank element. Before we had just ignored /order/line/item but that could lead to some big problems as it owuld not see that item has been changed on line 2.
For the amount of decimals can some time be deficult to control and they may not be important. So we also have an option to handle it. We can specifcy how many decimals we want to compare with.
We then end up the the following ignoring expressions.
/order/line/qty{%.2f};
/order/line/item{empty-missing}
We then up with the following differences as expected. Here we can see that item 2 is different and there is a difference in line 4 qty. If we had used the old approach we would just have ignored the two differences and not seen it as a problem.
This feature will be in 2.14 of the Figaf Testing Tool and Devops Tool.
It is something like this kind of rules that can make it easy or impossible to use an automated testing tool.
Signup to the Figaf DevOps tool to try it out on your own system.