Skip to content

Rerun only the tests that failed

Say a Playwright job ran 50 tests. One failed and one passed only on retry. When you rerun that build, TestPerch can ask Playwright to run those two tests again. The 48 that passed the first time can sit this one out.

Start with a completed Playwright run that reported results from GitHub Actions. The TestPerch reporter enables this behavior by default.

  1. Open the failed run in TestPerch → Runs. Note the build and the names of the tests under Failed and Flaky.
  2. In GitHub Actions, open that same workflow run. Choose Re-run jobs → Re-run failed jobs and confirm. GitHub restarts the failed job, and the reporter uses the earlier results to choose the tests inside it. GitHub’s guide to rerunning jobs
  3. In TestPerch Runs, open the next attempt for the same build. Check which tests ran and whether they passed.

Pushing a fix creates a new build. To retry the same code, use the rerun action on the original workflow. If you split your suite across several CI jobs, configure the shards to report one run to use focused retries across them.