[JIRA] (JENKINS-61174) BoostTest-1.x in xUnit plugin fails to parse a test log containing skipped tests

5 views
Skip to first unread message

hnoda@zio.co.jp (JIRA)

unread,
Feb 21, 2020, 2:22:04 AM2/21/20
to jenkinsc...@googlegroups.com
Hisayori Noda created an issue
 
Jenkins / Bug JENKINS-61174
BoostTest-1.x in xUnit plugin fails to parse a test log containing skipped tests
Issue Type: Bug Bug
Assignee: Nikolas Falco
Components: xunit-plugin
Created: 2020-02-21 07:21
Environment: Windows 10 Pro 1909 Japanese
Oracle JDK 11.0.6 64-bit
Jenkins ver. 2.204.2
xUnit plugin 2.3.8
Running Jenkins directly on a PC. (Not on a container.)
Jenkins is accessed directly. (Not through a reverse proxy.)
Jenkins is installed with a Windows installer.
Firefox 73.0.1 (64 bits)
Priority: Minor Minor
Reporter: Hisayori Noda

I tried to parse the log of a unit test with BoostTest-1.x in xUnit plugin.  Unfortunately it failed with the following error message.

 

ユーザーHisayori Nodaが実行
Running as SYSTEM
ビルドします。 ワークスペース: D:\data\Jenkins\workspace\xunit_plugin.experimental
INFO: Starting to record.
INFO: Processing BoostTest-1.x (default)
INFO: [BoostTest-1.x (default)] - 1 test report file(s) were found with the pattern '*.xml' relative to 'D:\data\Jenkins\workspace\xunit_plugin.experimental' for the testing framework 'BoostTest-1.x (default)'.
WARNING: The file 'D:\data\Jenkins\workspace\xunit_plugin.experimental\log.xml' is an invalid file.
WARNING: At line 1 of file:/D:/data/Jenkins/workspace/xunit_plugin.experimental/log.xml:cvc-complex-type.3.2.2: 要素'TestCase'に属性'skipped'を含めることはできません。
WARNING: At line 1 of file:/D:/data/Jenkins/workspace/xunit_plugin.experimental/log.xml:cvc-complex-type.3.2.2: 要素'TestCase'に属性'reason'を含めることはできません。
WARNING: At line 1 of file:/D:/data/Jenkins/workspace/xunit_plugin.experimental/log.xml:cvc-complex-type.2.4.b: 要素'TestCase'のコンテンツは不完全です。'{TestSuite, Info, Error, FatalError, Message, Exception, Warning, TestingTime}'のいずれかが必要です。
ERROR: Step 'Publish xUnit test result report' failed: The result file 'D:\data\Jenkins\workspace\xunit_plugin.experimental\log.xml' for the metric 'BoostTest' is not valid. The result file has been skipped.
Finished: FAILURE

The source code of the unit test case is below.

 

 

# define BOOST_TEST_MAIN
#include <boost/test/included/unit_test.hpp>

BOOST_AUTO_TEST_CASE(test1, *boost::unit_test::disabled())
{
    const int x = 1;
    BOOST_CHECK(x == 1);
}

BOOST_AUTO_TEST_CASE(test2)
{
    const int x = 1;
    BOOST_CHECK(x == 1);
}

The unit test contains a skipped test case.  The version of Boost was 1.72.0.

The command line to execute the unit test was below.

BoostTestExperimental.exe --log_format=XML --log_level=test_suite --log_sink=log.xml

The contents of the log file was below.

<TestLog><TestSuite name="Master Test Suite"><TestCase name="test1" skipped="yes" reason="disabled"/><TestCase name="test2" file="C:\Users\hnoda\source\repos\BoostTestExperimental\BoostTestExperimental\BoostTestExperimental.cpp" line="10"><TestingTime>331</TestingTime></TestCase></TestSuite></TestLog>

Could you please investigate this one?

Thanks,

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

nfalco79@hotmail.com (JIRA)

unread,
Feb 25, 2020, 8:03:02 AM2/25/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages