itplr-kosit / validator

Validates XML documents with XML Schema and Schematron
Apache License 2.0
80 stars 42 forks source link

Assertion results output #115

Open rboitsg opened 1 year ago

rboitsg commented 1 year ago

When using --check-assertions I can see the successfull and failed assertions in console/stdout. Assertions run: 44, Assertions failed: 15

An assertion may define a message for what is being tested:

  <a:assertion
      report-doc="MyEvilFile-report.xml"
      test="/rep:report/rep:assessment/rep:accept">
    Report has status accept
  </a:assertion>

Where can I find this text?

Use Case: It is difficult to track down failed assertions if the number of assertions is more than one.

For reference, I call the KoSIT Validator within Ant like this:

[apply] Executing 'java' with arguments:
[apply] '-jar'
[apply] 'lib/validationtool-1.5.0-standalone.jar'
[apply] '-h'
[apply] '-s'
[apply] 'build/config/scenarios.xml'
[apply] '-r'
[apply] 'build/config'
[apply] '--check-assertions'
[apply] 'build/test/assertions.xml'
[apply] '-o'
[apply] 'build/test/report/'
[apply] 'MyEvilFile.xml'