pytest-dev / pytest-dev/pytest
Add test warning output to JUnit XML file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
The new feature where pytest captures all the warnings and reports them after it runs is great. Unfortunately, those warnings do not appear in the JUnit XML file and that means that our CI system does not report the warnings to the user. Is it possible to capture the warnings from each and store them in the appropriate stderr section in the XML file? It seems like warnings are intercepted before they can be caught by the JUnit code. Making them visible to our CI users would motivate them to fix them.
Thanks again for pytest.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how pytest captures warnings and how its JUnit XML reporter writes each test's output. Review the existing warning and JUnit reporting tests, if present, before deciding where the data should connect. Done means warnings appear in the appropriate stderr section of the JUnit XML and remain visible to CI users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ci-cd, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100