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

Hudson does not correctly parse Google Test/PHPUnit XML output

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: junit-plugin
    • Labels:
      None
    • Environment:
      Platform: PC, OS: Windows XP
    • Similar Issues:

      Description

      Google test (aka gtest), a C++ testing framework, generates XML output files which Hudson fails to
      parse correctly. The problem is that gtest generates a single XML file containing all test results for each
      class, rather than one XML file per class, like so:

      <testsuite tests="453" failures="0" disabled="0" errors="0" time="36.09" name="AllTests">
      <testsuite name="ExampleClassname" tests="7" failures="0" disabled="0" errors="0" time="9.28">
      <testcase name="exampleTestName" status="run" time="0" classname="ExampleClassname" />
      </testsuite>
      </testsuite>

      Hudson complains that no results could be read from the resulting XML file. I wrote a perl script to
      break the testsuites up into individual files, and then pointed hudson to the directory containing those
      files, and it was able to parse them correctly.

        Attachments

          Issue Links

            Activity

            Hide
            gbois Gregory Boissinot added a comment -

            xUnit plugin is out. Pending your feedback.

            Show
            gbois Gregory Boissinot added a comment - xUnit plugin is out. Pending your feedback.
            Hide
            hobodave hobodave added a comment -

            Working ok so far, but I had to change my setup a bit. The issue is I can't get it to work with a directory
            outside of my module directory. Not even a full path or a .. is respected. Is this something that could be
            made possible?

            Show
            hobodave hobodave added a comment - Working ok so far, but I had to change my setup a bit. The issue is I can't get it to work with a directory outside of my module directory. Not even a full path or a .. is respected. Is this something that could be made possible?
            Hide
            gbois Gregory Boissinot added a comment -

            Is that OK to add a check box for use the workspace as the root dir?

            Thanks.

            Show
            gbois Gregory Boissinot added a comment - Is that OK to add a check box for use the workspace as the root dir? Thanks.
            Hide
            cchan_qa cchan_qa added a comment -

            Sorry, I haven't report back for a while. For those who are interested, this issue has now been fixed in GoogleTest 1.4.0. The report XML can be parsed directly by Hudson using the out of the box JUnit parser.
            http://code.google.com/p/googletest/issues/detail?id=114

            For a complete list of changes in the GoogleTest 1.4.0 release, please refer to:
            http://code.google.com/p/googletest/source/browse/tags/release-1.4.0/CHANGES

            Cheers!

            Show
            cchan_qa cchan_qa added a comment - Sorry, I haven't report back for a while. For those who are interested, this issue has now been fixed in GoogleTest 1.4.0. The report XML can be parsed directly by Hudson using the out of the box JUnit parser. http://code.google.com/p/googletest/issues/detail?id=114 For a complete list of changes in the GoogleTest 1.4.0 release, please refer to: http://code.google.com/p/googletest/source/browse/tags/release-1.4.0/CHANGES Cheers!
            Hide
            evernat evernat added a comment -

            Closing as fixed: support of PHPUnit was added in the xUnit plugin and "google test" finally fixed the issue in v1.4.0 on its side.

            Show
            evernat evernat added a comment - Closing as fixed: support of PHPUnit was added in the xUnit plugin and "google test" finally fixed the issue in v1.4.0 on its side.

              People

              • Assignee:
                Unassigned
                Reporter:
                sqook sqook
              • Votes:
                6 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: