Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65438

xunit plugin fails to parse report from Catch2

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • xunit-plugin
    • None
    • Jenkins 2.277.2, xunit-plugin 3.0.1

      The xUnit plugin fails to parse JUnit reports created by Catch2. The time (duration) values have the wrong format. The error message is:

      WARNING: The file '<path>\TestResults-Scintilla.xml' is an invalid file.
      WARNING: At line 3 of [file:/|file:///]<path>/TestResults-Scintilla.xml:cvc-pattern-valid: Wert '0.022408' ist nicht Facet-gültig in Bezug auf Muster '(([0-9]{0,3},)*[0-9]{3}|[0-9]{0,3})*(\.[0-9]{0,3})?' für Typ 'SUREFIRE_TIME'.
      WARNING: At line 3 of [file:/|file:///]<path>/TestResults-Scintilla.xml:cvc-attribute.3: Wert '0.022408' des Attributs 'time' bei Element 'testsuite' hat keinen gültigen Typ 'SUREFIRE_TIME'.
      ERROR: Step ‘Publish xUnit test result report’ failed: The result file '<path>\TestResults-Scintilla.xml' for the metric 'JUnit' is not valid. The result file has been skipped.
      

      It seems that it expects time values only with 3 decimal digits, but the generated file contains 6.

      See the bug report for Catch2: https://github.com/catchorg/Catch2/issues/2221

          [JENKINS-65438] xunit plugin fails to parse report from Catch2

          Nikolas Falco added a comment - - edited

          As reported in the plugin documentation JUnit supported schema are Ant junit and Maven Surefire

          Schemas reports 3 digit for duration

          Nikolas Falco added a comment - - edited As reported in the plugin  documentation JUnit supported schema are Ant junit and Maven Surefire Schemas reports 3 digit for duration

          I forgot to mention that this seems to be a regression of version 3.0. We used version 2.4.0 before on Jenkins 2.235.5 and it worked then.

          We also used an older version of Catch before (version 1.0 build 47) that was part of the Scintilla version we are using. That version also misses the name attribute from the root testsuite element. I tried to fix it ad-hoc for the new xunit version by upgrading the Catch header, but the time format issue remained.

          Joachim Mairböck added a comment - I forgot to mention that this seems to be a regression of version 3.0. We used version 2.4.0 before on Jenkins 2.235.5 and it worked then. We also used an older version of Catch before (version 1.0 build 47) that was part of the Scintilla version we are using. That version also misses the name attribute from the root testsuite element. I tried to fix it ad-hoc for the new xunit version by upgrading the Catch header, but the time format issue remained.

          Nikolas Falco added a comment -

          Those schemas was used since version 2.0

          Nikolas Falco added a comment - Those schemas was used since version 2.0

          OK, sorry, I just checked. It was indeed broken before but I had not noticed that before. So it seems that this worked last before version 2.0 of xunit. I had to reconfigure the test result sources after the upgrade and forgot that I had the "ignore broken test results" flag checked before.

          Joachim Mairböck added a comment - OK, sorry, I just checked. It was indeed broken before but I had not noticed that before. So it seems that this worked last before version 2.0 of xunit. I had to reconfigure the test result sources after the upgrade and forgot that I had the "ignore broken test results" flag checked before.

            nfalco Nikolas Falco
            jmairboeck Joachim Mairböck
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: