Skip to content

Test case validate_withoutSchema_dataseteditorddi32 in DocumentBoV1Test correctly fails on Olivers dev-box

  • Test case DocumentBoV1Test.validate_withoutSchema_dataseteditorddi32 failed on Olivers dev-box. See this error message.
  • Why don´t test executions fail on my machine and also not on the CI pipelines?

Findings

  • The test document without-schema-demo-dataseteditor-ddi32.xml is not suitable at all for the test purpose validate xml against schema , because the file is even not wellformed: The prefixes are used by the elements but not defined: The document is not well-formed, so it can´t be used to test if it is validatable. But even worse ...

  • The reason why the test failed on Olivers devbox is: The validation is poorly implemented! There is a conditional-check on the message of the thrown SAXParseException, which shows that the file is not wellformed. But because I´ve thought this shows invalidity of the file, I checked against the message text 😂 😭 😂 and - tata - the message text is in english! - pause - Olivers JVM message texts are german! There seems not to be a easy way to distinguish if a file is not validatable or it is invalid. So this feature is suspended!

Actions

  • DONE File with unbound prefixes is good as test case for not-wellformedness.
  • DONE Execute schema validation and map all SAXParseException to ContentNotValidException
Edited by Alexander Mühlbauer