• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • xunit-plugin
    • None
    • Jenkins 2.127
      xUnit plugin 2.0.2

      Job log show lots of error lines starting like:

      INFO: [JUnit] - 2 test report file(s) were found with the pattern 'phpunit-result.xml, selenium.xml' relative to '/var/lib/jenkins/workspace/bob-develop' for the testing framework 'JUnit'.
       WARNING: The file '/var/lib/jenkins/workspace/bob-develop/phpunit-result.xml' is an invalid file.
       WARNING: At line 3 of file:/var/lib/jenkins/workspace/bob-develop/phpunit-result.xml:cvc-complex-type.3.2.2: Attribute 'assertions' is not allowed to appear in element 'testsuite'

      I can supply a full XML file if needed.

          [JENKINS-51919] jUnit output of PHPUnit test fail to parse

          Nikolas Falco added a comment -

          Assertions is not a valid attribute for the testsuite element of supported JUnit report.
          The managed scenarios are errors, failure and skipped What assertions means?

          If you would support the custom junit format for phpunit test 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.

          Nikolas Falco added a comment - Assertions is not a valid attribute for the testsuite element of supported JUnit report. The managed scenarios are errors, failure and skipped What assertions means? If you would support the custom junit format for phpunit test 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.

          Nikolas Falco added a comment -

          Consider to use the internal PHPUnit support instead of leave PHP to produce a compatible report.

          Nikolas Falco added a comment - Consider to use the internal PHPUnit support instead of leave PHP to produce a compatible report.

          It did work with xUnit 1.X though. I think you should provide a very clear warning when you break backwards compatibility - and provide a way to keep the old version until we've had a chance to resolve the issue. The 1.X -> 2.X upgrade has broken a lot of existing functionality.

          Lars Skjærlund added a comment - It did work with xUnit 1.X though. I think you should provide a very clear warning when you break backwards compatibility - and provide a way to keep the old version until we've had a chance to resolve the issue. The 1.X -> 2.X upgrade has broken a lot of existing functionality.

          Nikolas Falco added a comment -

          As you suggest I mark the plugin to show a warning since version 2.0 and a clear message in the wiki page.

          Nikolas Falco added a comment - As you suggest I mark the plugin to show a warning since version 2.0 and a clear message in the wiki page.

          Yeah, this issue completely butchered my unit test parsing.  I switched to the PHPUnit-X parser and it worked pretty well, still using JUnit output.

          Captain Hypertext added a comment - Yeah, this issue completely butchered my unit test parsing.  I switched to the PHPUnit-X parser and it worked pretty well, still using JUnit output.

            nfalco Nikolas Falco
            larsskj Lars Skjærlund
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: