Description
What's the problem this feature will solve?
The Xray plugin for Jira (https://docs.getxray.app/display/XRAY/Taking+advantage+of+JUnit+XML+reports) uses an extended JUnit format to store e.g. the test description and test evidence:
- The test description is stored as text inside a property element with
name="test_description"
: link to Xray documentation - The test evidence is stored as (base64-encoded)
item
Elements inside aproperty
Element withname="test_evidence"
: link to Xray documentation
The current implementation of pytest's record_property()
fixture does not allow for these use cases.
Describe the solution you'd like
I've started writing a plugin to address these issues: https://github.com/PascalVaudrevange/pytest-junit-xray-xml by rewriting the JUnit export and providing Xray-specific fixtures. It's currently work in progress (so e.g. the JUnit-family selection is not implemented yet) and has not been thoroughly tested yet.
Alternative Solutions
Alternatively, one could probably use NUnit export, but this would require NUnit support along the CI/CD chain - in my use case, this is not the case.
Additional context
I'm happy to write the plugin. With this feature request I'd like to
- gauge whether there is enough interest to pursue this further
- understand if this should be a plugin or whether there is interest in making this part of standard
pytest
(see next point) - I might misremember, but I think I saw a comment in one of the issues here that mentioned that there might be a case for moving the JUnit support from
pytest
itself into a plugin, so this might be another use case for the plugin above. But I might misremember.