JUnit Parser avoid "unnamed test suite" when classname blank

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Plugins
    • None
    • 0
    • 1

      We use the JUnit Parser for pytest. We recently migrated to Bazel's py_test and it seems that classname is now blank in junit xml output.  When that happens, bamboo display's "unnamed test suite" for classname.

      It would be nice, when "testcase" tag's "classname" attribute is empty, to leave it blank or allow "testsuite" tag's "name" attribute to be used when "testcase" tag's "classname" attribute is empty.

      Pytest junit allows "junit_suite_name" flag to set "name" attribute in "testsuite" tag: https://docs.pytest.org/en/6.2.x/usage.html#creating-junitxml-format-files.  

      If both "name" and "classname" empty, then test results would leave off classname portion instead of displaying "unnamed test suite" on the page.

      We could force a classname using https://docs.pytest.org/en/6.2.x/usage.html#record-xml-attribute method, but it is more tedious than just leaving classname blank or using testsuite name on Bamboo.

            Assignee:
            Unassigned
            Reporter:
            Dennis Hoer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: