Skip to content

junit error message is not very descriptive #7385

@dajose

Description

@dajose

Currently when a test fails on setup or teardown, the junit error stored has a generic message indicating whether it was during setup or teardown. See https://github.com/pytest-dev/pytest/blob/master/src/_pytest/junitxml.py#L240.

This causes tools reading xml having to rely on the full trace to understand the error cause, which is not always easy to read as it can be a long message.

Can a descriptive short detail be added? I'll say something like

 msg = "test teardown failure with error {}".format(report.longrepr.reprcrash.message)

That's a big simplification, all the considerations taken with failures should be added as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: junitxmlrelated to the junitxml builtin plugintype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions