pytest-dev / pytest-dev/pytest
Configurable behavior for maxfail
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
It'd be helpful if you could change pytest's behavior on a maxfail condition. Pytest currently interrupts the full test session, which can lead to misleading total results in say a junit xml file.
Specifically, if you're tracking test #s and failures over time, you'll have 0/0/100 (fail/skip/pass) tests one run, then 5/0/5 tests the next run. If they were skipped instead, you would have 5/90/5. This way, you still see that you have 100 tests total.
While I would prefer it to default to skipping the rest of the tests, I can understand that behavior might not be desireable for all current users of pytest (which is why I would think that this would be best set as an option in pytest.ini).
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 the maxfail condition interrupts the full test session and how resulting counts are written to a junit XML file. Determine where pytest.ini options are handled and define a configurable mode that preserves the remaining tests as skipped; done means the selected behavior produces consistent total counts without changing the existing default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100