Whole Content Comparison - iks-gmbh-tools/SysNat GitHub Wiki

Validating the whole content of a document by comparison with a predefined Should-Be document is one of the three different approaches of the SysNat DocVal Framework. To follow this approach, two preconditions must be fulfilled. A valid document (asserted by a domain expert by a manual/visual check must be available and called Should-Be document) and a number of Ignore Rules must be defined to skip those details for comparison that are specific to each individual document (e.g. order number or issue date).

For defining those Ignore-Rules the following possibilities exist:

For document comparison, file "ShouldBe.pdf" is used as should-be-document. 
For document comparison, all lines that start with, end with or represent a date value of format "DD.mm.YYYY" are ignored. 
For document comparison, all lines that start with prefix "Order Number" are ignored. 
For document comparison, all lines that contain "Addition:" are ignored. 
For document comparison, all lines that match pattern ".*" are ignored. 
For document comparison, the line 1 on page 2 in the actual document is ignored. 
For document comparison, the line 3 on page 4 in the should-be-document is ignored. 
For document comparison, the line 5 on page 6 in both documents is ignored.   

Having prepared such a nldocval file (e.g. MyDocumentComparisonRules.nldocval) the following natural language instruction can be used in an Executable Example:

Does content of document 'MyDocument.pdf' match the content-comparison rules in "MyDocumentComparisonRules.nldocval"?

In case you wish an exact comparison you can use the natural language instruction

Does content of document 'MyDocument.pdf' and the one of document "AnotherDocument.pdf" match exactly?

See also this example.

Back to DocVal