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

xunit plugin fails to parse report from Catch2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Do
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.277.2, xunit-plugin 3.0.1
    • Similar Issues:

      Description

      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

        Attachments

          Activity

          Hide
          nfalco 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

          Show
          nfalco 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
          Hide
          jmairboeck 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.

          Show
          jmairboeck 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.
          Hide
          nfalco Nikolas Falco added a comment -

          Those schemas was used since version 2.0

          Show
          nfalco Nikolas Falco added a comment - Those schemas was used since version 2.0
          Hide
          jmairboeck 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.

          Show
          jmairboeck 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.

            People

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

              Dates

              Created:
              Updated:
              Resolved: