pytest-dev / pytest-dev/pytest
Flag to run tests based on the summary output of a previous run
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
What's the problem this feature will solve?
A common workflow is to re-run locally tests that have failed on CI. When there are a number of failures, it is not straightforward to do so, as it requires a lot of copy/paste test ids.
Describe the solution you'd like
If the user is running with -ra on CI, the summary output could be used as input to pytest to only run the failed tests. Then the user can copy/paste the summary output into a file, and call pytest with -x/--sw in order to resolve the tests bit by bit locally.
I think this could be done via a flag:
--from-summary-output=file.txt--from-summary=file.txt
We don't need a short version for this flag I believe.
Additional context
Idea came from this discussion in the mailing list.
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 reading pytest's -ra summary output and the existing -x/--sw command-line behavior. Determine how a file containing summary output could identify failed tests, then verify that the proposed flag runs only those tests and works with the existing stopping options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100