-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Flag to run tests based on the summary output of a previous run #12619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We should instead have options to fetch last failed from a artifact |
There are also uses for running a list of tests from a file or preserving It would be good to have a parallel option for saving the |
Not sure one things excludes the other TBH.
Agreed. |
i primarily want to avoid using a summary that intentionally doesnt have a defined stable output as data source - a reportlog, lastfailed file or junitxml report would be much better for consistent parsing |
I see. One of the requirements is "copy/paste from the summary output" so users do not have to setup anything extra on CI. We would have to forego that requirement for that to work, in which case I would prefer to withdraw this proposal as it is no longer viable for the use case I have in mind (someone else of course can open a new proposal similar to this one). |
There just needs to be an option to output whatever format this is on stdout. The Needing to fiddle with artifacts is awkward though and should be avoided. |
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.
The text was updated successfully, but these errors were encountered: