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

Hudson does not correctly parse Google Test/PHPUnit XML output

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • junit-plugin
    • None
    • Platform: PC, OS: Windows XP

      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.

        1. test.xml
          2 kB
          patranqc
        2. phpunitflattener.py
          0.7 kB
          mcrooney

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

              Created:
              Updated:
              Resolved: