SysNat DocVal Framework - iks-gmbh-tools/SysNat GitHub Wiki
The DocVal is a small framework embedded in SysNat that supports developers in implementing steps for asserting expected business results. A typical business result for enterprise applications is an order or an contract. This kind of domain object is typically presented to the customer as a PDF. That is why DocVal comes with currently only with a PDFReader that parses the content of a PDF into a SysNat-DocumentStructure. However, whenever a reader is implemenred for e.g. Microsoft Word docx files, the whole DocVal framework can be applied to this kind of documents.
DocVal has three approaches to validate a document:
-
Asserting the presence of a character sequence wihhin the document. Several possibilities exist to follow this Text-Search approach.
-
Asserting the structure of a document that consists of a series of predefined parts. Those parts can be identified automatically if the definition of the parts contain the required and specific information (Structure-Comparison).
-
Asserting the whole content of a document by comparing it with the content of a Should-Be-Document. A Should-Be-Document represents a document generated by the system under test earlier that has been asserted by business. Typically for this approach, some lines that contain data such as date values or object ids need to be ignored. Therefore, a number of Ignore-rules can be defined to make this appoach practicable (Whole-Content-Comparison).