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

use testsuite name to built hierachy


    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • junit-plugin
    • Jenkins 1.638 JUnit plugin 1.9 xUnit plugin 1.98 Ubuntu 14.04 nose 1.3.7

      I am using `nose` to generate xunit test result files. With the option `--xunit-testsuite-name=<NAME>` (https://nose.readthedocs.org/en/latest/plugins/xunit.html#cmdoption--xunit-testsuite-name) it sets the `name` attribute in the `testsuite` tag to a custom value instead of the default value `nosetests`). The following is an example result file - note the `name` attribute in the root tag:

      <testsuite name="great_name_to_group_all_these_testcases" tests="2" errors="0" failures="0" skip="0">
        <testcase classname="test.test_something.FooTest" name="test_foo" time="0.001"></testcase>
        <testcase classname="test.test_something.BarTest" name="test_bar" time="0.001"></testcase>

      Currently the xunit plugin (I am using the JUnit repor) does not use the `name` attribute of the `testsuite` tag anywhere. The hierarchy of the test results is built only based on the `classname` of the `testcase` tag. If multiple result files contain testcases it is not clear to which result file they belong.

      It would be very helpful if the hierarchy would also include the `name` attribute of the `testsuite` tag to build the hierarchy. This would group the testcases from each testsuite more reasonable.

      Please let me know if I can provide any more information.

            Unassigned Unassigned
            dthomas Dirk Thomas
            2 Vote for this issue
            3 Start watching this issue