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

junit output of nosetests fails to parse

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      xunit plugin 2.0.2
    • Similar Issues:

      Description

      xunit files generated with nose fail to parse with the latest xunit plugin version 2.0.2.
      I have rolled back to 1.104, and the problem is gone.

      Jenkins log:

      15:57:49 INFO: Processing JUnit
      15:57:49 INFO: [JUnit] - 1 test report file(s) were found with the pattern '[path omitted]\TestReport.xml' relative to '[path omitted]' for the testing framework 'JUnit'.
      15:57:50 WARNING: The file '[path omitted]\TestReport.xml' is an invalid file.
      15:57:50 WARNING: At line 1 of file:[path omitted]\TestReport.xml:cvc-complex-type.3.2.2: Attribute 'skip' is not allowed to appear in element 'testsuite'.
      15:57:50 ERROR: The result file '[path omitted]\TestReport.xml' for the metric 'JUnit' is not valid. The result file has been skipped.
      

      Relevant xml:

      <?xml version="1.0" encoding="UTF-8"?><testsuite name="nosetests" tests="32" errors="1" failures="0" skip="0">[rest of file goes here]
      

      Looks like this old issue from 2013 might be relevant, as it describes the same problem: 
      https://issues.jenkins-ci.org/browse/JENKINS-18095

       

       

       

        Attachments

          Issue Links

            Activity

            Hide
            nfalco Nikolas Falco added a comment - - edited

            The skip attribute is not valid, the correct one is skipped. The junit parser does not take "skip" it into account when it processes the junit.xml.

             

            In the reported in node site ( http://nose.readthedocs.io/en/latest/plugins/xunit.html ) refer to some XUnit XML format in jenkins. I never hear that format.

            Please let me know if you find any documentation about XUnit format it refer and i will add support to translate XUnit into JUnit report.

            Seems in nose2 add support to junit format directly but the attribute is always wrong (they changes from skip to skips)

            Show
            nfalco Nikolas Falco added a comment - - edited The skip attribute is not valid, the correct one is skipped. The junit parser does not take "skip" it into account when it processes the junit.xml.   In the reported in node site ( http://nose.readthedocs.io/en/latest/plugins/xunit.html ) refer to some XUnit XML format in jenkins. I never hear that format. Please let me know if you find any documentation about XUnit format it refer and i will add support to translate XUnit into JUnit report. Seems in nose2 add support to junit format directly but the attribute is always wrong (they changes from skip to skips)
            Hide
            nfalco Nikolas Falco added a comment -

            Skip or Skips is not a valid attribute for the testsuite element of JUnit report.
            The correct name for that attribute is skipped. If you would support the custom junit format for nose or nose2 please select the "Custom Tool" as test type and provide an XSL to conver the generated report to a correct format of the supported JUnit format. In the "custom stylesheet" value you could insert the path of your XSL file that could be absolute on the server (master) or relative to the workspace.

            Show
            nfalco Nikolas Falco added a comment - Skip or Skips is not a valid attribute for the testsuite element of JUnit report. The correct name for that attribute is skipped. If you would support the custom junit format for nose or nose2 please select the "Custom Tool" as test type and provide an XSL to conver the generated report to a correct format of the supported JUnit format. In the "custom stylesheet" value you could insert the path of your XSL file that could be absolute on the server (master) or relative to the workspace.

              People

              Assignee:
              nfalco Nikolas Falco
              Reporter:
              mibias Michael Frikke Madsen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: