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

BoostTest-1.x in xUnit plugin fails to parse a test log containing skipped tests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      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,

       

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            nfalco Nikolas Falco
            Reporter:
            hisayori_noda Hisayori Noda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: