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

For Unittest++ xml, want to have a <time> tag inside of the <test> tag

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Won't Do
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.653, Linux
    • Similar Issues:

      Description

      For passing the test duration time to xUnit, it needs to be as an attribute of the <test> tag like this:

      <?xml version="1.0"?>
      <unittest-results>
        <test suite="Package.Suite" name="Testname" time="1.234"/>
      </unittest-results>
      

      It would be nice to alternatively allow to pass this information in a <time> tag like this:

      <?xml version="1.0"?>
      <unittest-results>
        <test suite="Package.Suite" name="Testname">
          <time>1.234</time>
        </test>
      </unittest-results>
      

      (It's a bit similar to qt xml format, which uses something like `<Duration msecs="13"/>`; seen here: https://github.com/jenkinsci/xunit-plugin/blob/master/src/test/resources/org/jenkinsci/plugins/xunit/types/qtestlib/testcase2/input.xml)

      The reason for this improvement request is as follows: I use Unittest++ and Jenkins / xUnit for unit testing on very resource limited bare-metal microcontroller systems. These target systems especially have very low amount of RAM.
      As long as I have to pass the test duration time as attribute of the <test> tag, I have to store all the <system-out> and <failure> output / content into RAM until the test is finished; but this is quite impossible for some test cases.
      If I became able to pass the test duration time into a <time> tag, then I just can stream out all the <system-out> and <failure> output /content (typically via RS232) without the need of so much RAM and at the end of the test I stream out the <time> tag.

        Attachments

          Activity

          Hide
          joemerten Joe Merten added a comment - - edited
          Show
          joemerten Joe Merten added a comment - - edited Seems that this just needs a change in [unittest-1.1-to-junit-1.0.xsl| https://github.com/jenkinsci/xunit-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/xunit/types/unittest-1.1-to-junit-1.0.xsl ], isn't it?
          Hide
          nfalco Nikolas Falco added a comment -

          the XSL is that you link. You can copy it and than customize it to fit your needs (with the time xml element you wrote in the main discussion).

          In the jenkins job select Custom tool type setup your XSL location.

          Show
          nfalco Nikolas Falco added a comment - the XSL is that you link. You can copy it and than customize it to fit your needs (with the time xml element you wrote in the main discussion). In the jenkins job select Custom tool type setup your XSL location.

            People

            • Assignee:
              nfalco Nikolas Falco
              Reporter:
              joe_merten Joe Merten
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: