Skip to content

Add name property to testsuites element in generated JUnit XML #12736

Closed

Description

@joseph-sentry

What's the problem this feature will solve?

Jest and Vitest JUnit Reporters do this, they include: jest tests and vitest tests as the value of the testsuites element's name property.

Describe the solution you'd like

The JUnit XML generated by pytest should always include pytest tests as the value of the name property of the testsuites element.

It's my opinion that this property should not be customizable., there should be some static information in the JUnit that represents the fact that pytest generated this file.

Alternative Solutions

There isn't any way to set or customize that property right now.

Activity

  1. RonnyPfannschmidt commented on Aug 23, 2024

    @RonnyPfannschmidt
    Member

    Please reference a junitxml spec defining this attribute

  2. added
    status: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivity
    on Aug 26, 2024
  3. joseph-sentry commented on Aug 27, 2024

    @joseph-sentry
    ContributorAuthor

    Here's what I found:

    • link this spec doesn't even include the field
    • link this spec defines it as "the name of the entire test run"
    • link this spec defines it as "The label of the scan"

    Further here's an example JUnit file from the Jenkins JUnit plugin that is used in their tests that makes use of the property, which means that it's supported by Jenkins: link

    It doesn't seem well defined, however as i mentioned the jest and vitest reporters make the default of that property: "jest tests" and "vitest tests" but they allow it to be customizable.

  4. github-actions commented on Sep 11, 2024

    @github-actions
    Contributor

    This issue is stale because it has the status: needs information label and requested follow-up information was not provided for 14 days.

  5. github-actions commented on Sep 18, 2024

    @github-actions
    Contributor

    This issue was closed because it has the status: needs information label and follow-up information has not been provided for 7 days since being marked as stale.

  6. nicoddemus commented on Sep 18, 2024

    @nicoddemus
    Member

    Reopening as it was closed by the stalebot erroneously (more information was provided after all).

  7. added
    plugin: junitxmlrelated to the junitxml builtin plugin
    and removed
    status: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivity
    on Sep 18, 2024
  8. added a commit that references this issue on May 2, 2025
    7746f4f
  9. moved this from 🦉 Inclusion ⚖️ to 🌈 Done 🦄 in 📅 Procrastinating in public 😵‍💫on May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: junitxmlrelated to the junitxml builtin plugin

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions