-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Flaky test marking and retrying #1057
Comments
There should also be a way to retry ALL failed tests without needing special syntax like |
On top of this, if |
Another features of Playwright I've missed in Vitest is the ability to distinguish initial runs from retries. Like in the @playwright/test retries docs demo, it allows clearing cache on the server or browser for example. |
Clear and concise description of the problem
Often some tests tend to be flaky which is a nightmare in large CI/CD pipelines as you have to retrigger and rerun.
There is not always the time to fix those flaky tests (what would be the ideal case - no doubt)
But in reality it happens.
It would be nice to have a retry mechanism that does not block CI runs.
Suggested solution
I propose a feature that would mark tests as flaky (and then it would retry them up to a max that is specified when it fails)
like:
in the
vitest.config.ts
it could be then configured how often a flaky test should be retried on failure (default to 3 times)the test would then be rerun if it fails up to the maximum specified.
It would only do that for tests that are marked as
test.flaky
(Therefore it needs an incentive of the user to say this test is really flaky I know but I don't have time to fix it now)In the summary of the end it could then be written 3 flaky tests detected in addition to how many are passed or skipped.
Alternative
Not implement this feature
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: