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

xUnit plugin fails to parse simple xml output from unittest++

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Critical Critical
    • xunit-plugin
    • None
    • windows, linux, hudson 1.381, xUnit 1.11, unittest++ 1.4

      c++ code:
      SUITE( MyTestSuite )
      {
      bool MyFun()

      { return false; }

      TEST( TestSomeStuff )

      { CHECK( MyFun() ); CHECK( MyFun() ); }

      }

      produces this xml file:
      <?xml version="1.0"?>
      <unittest-results tests="1" failedtests="1" failures="2" time="0">
      <test suite="MyTestSuite" name="TestSomeStuff" time="0">
      <failure message="/data/test.cpp(14) : MyFun()"/>
      <failure message="/data/test.cpp(15) : MyFun()"/>
      </test>
      </unittest-results>

      reported error:
      [xUnit] [ERROR] - At line 5 of file:/d:/.hudson/jobs/***/UnitTest/TEST--615512892.xml:cvc-complex-type.2.4.a: Invalid content was found starting with element 'failure'. One of '

      {system-out, system-err}

      ' is expected.
      [xUnit] [WARNING] - The converted file for the result file 'd:\.hudson\jobs***\test_vcproj2cmake_testresults.xml' (during conversion process for the metric 'UnitTest-1.4 (default)') is not valid. The report file has been skipped.

      however, removing one line makes it work:
      <?xml version="1.0"?>
      <unittest-results tests="1" failedtests="1" failures="1" time="0">
      <test suite="MyTestSuite" name="TestSomeStuff" time="0">
      <failure message="/data/test.cpp(14) : MyFun()"/>
      </test>
      </unittest-results>

            gbois Gregory Boissinot
            apostasia apostasia
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: