[JIRA] Commented: (JENKINS-8003) xUnit plugin fails to parse simple xml output from unittest++

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (JENKINS-8003) xUnit plugin fails to parse simple xml output from unittest++

JIRA noreply@jenkins-ci.org

    [ http://issues.jenkins-ci.org/browse/JENKINS-8003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=145776#comment-145776 ]

gbois commented on JENKINS-8003:
--------------------------------

Despite the non display of the two failures in the testcase, does it suit you.
Available in xUnit 1.14+ (built for Jenkins 1.396)

> xUnit plugin fails to parse simple xml output from unittest++
> -------------------------------------------------------------
>
>                 Key: JENKINS-8003
>                 URL: http://issues.jenkins-ci.org/browse/JENKINS-8003
>             Project: Jenkins
>          Issue Type: Bug
>          Components: xunit
>    Affects Versions: current
>         Environment: windows, linux, hudson 1.381, xUnit 1.11, unittest++ 1.4
>            Reporter: apostasia
>            Assignee: gbois
>            Priority: Critical
>
> 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>

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira