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

xUnit plugin fails to parse JUnit XML generated by trx2junit

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I use https://github.com/gfoidl/trx2junit to convert TRX result files to JUnit (because the https://plugins.jenkins.io/junit plugin is so horribly memory-inefficient), however, xUnit does not accept its output:

      Value '0.4798998' 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 'SUREFIRE_TIME'.

      Simply accepting 7 (or even 8) decimal digits instead of 3 should fix the problem.

       

        Attachments

          Activity

          Hide
          nfalco Nikolas Falco added a comment -

          xUnit use JUnit plugin under the wood. So this does not resolve your initial issue.

          Anyway as documented in Wiki page xUnit only support two junit schema (maven surefire/ant). Both schema declare time with 3 decimals.

          Show
          nfalco Nikolas Falco added a comment - xUnit use JUnit plugin under the wood. So this does not resolve your initial issue. Anyway as documented in Wiki page xUnit only support two junit schema (maven surefire/ant). Both schema declare time with 3 decimals.
          Hide
          nfalco Nikolas Falco added a comment -

          xUnit should already support MSTest report type. Try to use internal feature

          Show
          nfalco Nikolas Falco added a comment - xUnit should already support MSTest report type. Try to use internal feature
          Hide
          notdifficult Not Diff added a comment -

          Sorry, I meant https://plugins.jenkins.io/mstest is terribly memory-inefficient. I want to avoid it and since it also used by xUnit, I am using the workaround via trx2junit.

          Thanks for pointing me to the junit surefire schema: https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd

          So it is trx2junit which needs to fix its output.

          Show
          notdifficult Not Diff added a comment - Sorry, I meant https://plugins.jenkins.io/mstest  is terribly memory-inefficient. I want to avoid it and since it also used by xUnit, I am using the workaround via trx2junit. Thanks for pointing me to the junit surefire schema: https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd So it is trx2junit which needs to fix its output.
          Hide
          nfalco Nikolas Falco added a comment -

          it's a trx2junit issue. It declare to create a junit output but there is not a defined standard so anyone can produce what they want. This is the main reason starting from version 2.0 I had restrict to the main two used common schema.

          As I told the do not need trx2junit at all because xUnit (like MSTest Plugin) should already support trx files. You simply need to choose MSTest report type instead of JUnit and in files use a pattern like this: */.trx

          Show
          nfalco Nikolas Falco added a comment - it's a trx2junit issue. It declare to create a junit output but there is not a defined standard so anyone can produce what they want. This is the main reason starting from version 2.0 I had restrict to the main two used common schema. As I told the do not need trx2junit at all because xUnit (like MSTest Plugin) should already support trx files. You simply need to choose MSTest report type instead of JUnit and in files use a pattern like this: * / .trx

            People

            Assignee:
            nfalco Nikolas Falco
            Reporter:
            notdifficult Not Diff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: