-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
xunit fails to parse junit xml files where the time attribute of the testcase element contains e.g 0.123456 or 1.6e-05, because it very narrowly defines the valid format to decimal notation with no more than three decimals.
This breaks parsing the junit output from e.g. https://github.com/catchorg/Catch2 as well as an internal unit testing framework with use at my workplace.
INFO: [JUnit] - 34 test report file(s) were found with the pattern '**/*result.xml' relative to 'foo' for the testing framework 'JUnit'. WARNING: The file 'foo/junit-result.xml' is an invalid file. WARNING: At line 3 of file:foo/junit-result.xml:cvc-pattern-valid: Value '1.6e-05' is not facet-valid with respect to pattern '(([0-9]{0,3},)*[0-9]{3}|[0-9]{0,3})*(\.[0-9]{0,3})?' for type '#AnonType_timetestsuite'. WARNING: At line 3 of file:foo/junit-result.xml:cvc-attribute.3: The value '1.6e-05' of attribute 'time' on element 'testsuite' is not valid with respect to its type, 'null'. ERROR: Step ‘Publish xUnit test result report’ aborted due to exception:
- is related to
-
JENKINS-52392 Support custom junit format that does not respect any precise schema
- Resolved