Description
It would be ideal to have a configuration option where flaky tests are retried at the end of the run once all other tests are finished. I see it was discussed here, but that one was closed and not sure the concept was since revisited.
This becomes a lot more relevant when using worker-scoped fixtures, since the thread gets torn down and all the auto: true
worker-scoped fixtures are retriggered for the new thread. Since many of these startup actions are expensive both in time and resource, it makes more sense for the failed tests to share new threads at the end of the run.
My personal vision of a solution would be a config setting in playwright.config
file eg retry-strategy: 'tailing'
. Doing it this way would also open the opportunity for other configurations such as not starting a new thread on failure, or max number of hard fails, conditional retries etc.