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

UnitTest++ "time" element is ignored in results page, Duration field reported as 0ms

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi,

      I'm using UnitTest++ to output a results XML file from my tests which I'm passing off to the XUnit plugin in Jenkins. My XML results (cut down version) file looks like this:

      <?xml version="1.0"?>
      <buildconfig>
      <unittest-results tests="4" failedtests="0" failures="0" time="7.045">
      <test suite="TimeFixedController" name="Construct" time="0"/>
      <test suite="TimeScaleOffsetController" name="Construct" time="0"/>
      <test suite="TimeScaleOffsetController" name="LoadSave" time="1.591"/>
      <test suite="PAnimatableComponent" name="LoadSave" time="5.454"/></unittest-results>
      </buildconfig>
      

      I've attached a screenshot of the problem. As you can see the "Duration" field of the tests is 0 ms. The XML clearly shows the time taken is not 0 ms.
      Also, in the top right you can see that the total length of time taken to run the tests is also 0 ms which is incorrect. I was expecting to see 7.045 ms as per the XML information.

      Am I misunderstanding what these Duration fields are or is this a bug, in which case can it be fixed?

      Thanks,
      Tom

        Attachments

          Activity

          Hide
          gbois Gregory Boissinot added a comment -

          It was a bug.
          I fixed it in the trunk.
          Could you attach the real unittest result file. In your sample, it seems there is the buildConfig section in excess.
          Thanks

          Show
          gbois Gregory Boissinot added a comment - It was a bug. I fixed it in the trunk. Could you attach the real unittest result file. In your sample, it seems there is the buildConfig section in excess. Thanks
          Hide
          tfields Thomas Fields added a comment -

          Hi,

          Thanks for fixing so quickly. I'll try the fix tomorrow.

          The build_config tags can be removed from the snippet I sent - it was a typo. Sorry about that.

          Thanks, Tom.

          Show
          tfields Thomas Fields added a comment - Hi, Thanks for fixing so quickly. I'll try the fix tomorrow. The build_config tags can be removed from the snippet I sent - it was a typo. Sorry about that. Thanks, Tom.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          pom.xml
          http://jenkins-ci.org/commit/xunit-plugin/d76ba0571ee3155d362878d1059cb211dfbe3027
          Log:
          Updated pom to fix JENKINS-10404

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: pom.xml http://jenkins-ci.org/commit/xunit-plugin/d76ba0571ee3155d362878d1059cb211dfbe3027 Log: Updated pom to fix JENKINS-10404
          Hide
          gbois Gregory Boissinot added a comment -

          You could download the plugin with the fix from the CI server (last build):
          http://ci.jenkins-ci.org/job/plugins_xunit/65/com.thalesgroup.jenkins-ci.plugins$xunit/

          Show
          gbois Gregory Boissinot added a comment - You could download the plugin with the fix from the CI server (last build): http://ci.jenkins-ci.org/job/plugins_xunit/65/com.thalesgroup.jenkins-ci.plugins$xunit/
          Hide
          tfields Thomas Fields added a comment -

          Hi,

          Just tested the 1.20-SNAPSHOT version and it works great. The times of my unit tests are correctly displayed in Jenkins. Thanks a lot.

          Tom.

          Show
          tfields Thomas Fields added a comment - Hi, Just tested the 1.20-SNAPSHOT version and it works great. The times of my unit tests are correctly displayed in Jenkins. Thanks a lot. Tom.
          Hide
          gbois Gregory Boissinot added a comment -

          Thanks for the reporting.
          The version 1.20 is available.

          Show
          gbois Gregory Boissinot added a comment - Thanks for the reporting. The version 1.20 is available.

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              tfields Thomas Fields
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: