Skip to main content
Re-run executes only the failed or flaky test cases from a finished test run, on the original commit or the latest code on the branch. The re-run is linked to the original test run so you can compare results. Start one from the test run page, the command line, or an AI agent.
Re-run requires @testdino/playwright 2.7.0 or later and Playwright 1.56 or later. Check yours with npm ls @testdino/playwright. Re-running inside the original GitHub run with only the failed test cases needs 2.7.8 or later.To start re-runs from the dashboard, connect GitHub to the project. Latest, Flaky, Custom, and test runs from outside GitHub Actions also need re-run inputs on a workflow. Add them with the AI agent prompt or the manual steps.

Start a re-run from the dashboard

Re-run is in the action row on a test run’s page, next to Debug with AI. It appears once the test run has finished with at least 1 failed or flaky test case, including a passed test run that contains flaky test cases. Re-run panel open on a test run page showing the Failed scope, the selected count, the Run against choice, the workflow, and the Re-run button The panel shows how many test cases will run, for example 7 of 9 selected, which code they run against, and the workflow that runs them. The button label says what will happen: The new test run appears in the run list once CI picks it up, marked Re-run of #N and linked to the original. It keeps the original test run’s run-level tags, so it shows up under the same tag filters. The original test run lists its re-runs under its header. See Test Runs.
A re-run is left out of run-level figures: test run count, pass rate, and average duration. Its test cases still appear in test-level views, and it is billed like any test run.

Choose which test cases run

A choice appears only when the test run has test cases for it. Custom appears when there is more than 1 test case to choose from. With more than 12 test cases or more than 3 spec files, the list adds a search box and grouping by spec file, failure reason, or project. Re-run panel in Custom scope showing hand-ticked test cases, the search box, and the group-by choice

Choose which code runs

Run against offers 2 options: When nothing newer has landed on the branch, the panel shows 1 statement instead of 2 options: Runs the same code as this run, with the commit. This commit is unavailable, with the reason shown, when the original test run recorded no commit or only an abbreviated one, or when the workflow cannot check out a specific commit. A local test run with uncommitted changes keeps This commit, with a note that the re-run uses the pushed code only. Latest is unavailable when the test run recorded no branch or the branch no longer exists. A This commit re-run on a deleted branch still starts, on the repository’s default branch, pinned to the original commit.

Re-run inside the original GitHub run

For a test run from GitHub Actions, This commit re-runs the failed jobs as a new attempt of the same GitHub run, instead of starting a new workflow run. No workflow change is needed. The panel says so before you start:
The failed jobs run again inside GitHub run #124. If they pass, that run turns green.
This path is used when all of these are true:
  • The test run came from a GitHub Actions run in the repository connected to the project.
  • The TestDino GitHub App has Actions write permission.
  • The scope is Failed or Both. Flaky and Custom start a new workflow run instead.
The re-run cannot start while the GitHub run is still in progress, or once it is more than 30 days old. Use Latest to start a new workflow run instead. Each retried job runs only its failed test cases when it runs npx tdpw test with @testdino/playwright 2.7.8 or later. Otherwise the button reads Re-run failed jobs in full and every test case in those jobs runs again. See Run only the failed test cases in each job.

Add tags to a re-run

A re-run keeps the original test run’s run-level tags. To label 1 re-run, type tags into Extra tags in the panel, separated by commas, for example hotfix-retry:
  • At most 10 tags per re-run.
  • Letters, digits, and . _ : / @ + - only, starting with a letter or digit.
  • A test run holds at most 50 tags. When the combined list is longer, the re-run’s own tags are kept and inherited tags are dropped.
Extra tags need @testdino/playwright 2.7.6 or later and a workflow that declares the testdino_rerun_tags input. A re-run inside the original GitHub run keeps that run’s tags and cannot add more; pick Latest to tag a re-run.

Re-run from the command line

Run manually in the panel gives the command for the current selection, with any test case id lists filled in:
Before running anything, the CLI checks the selection against the code you have checked out. Test cases renamed, moved, or deleted since the original test run, or filtered out by your Playwright arguments such as --project, are skipped. The warning names up to 10 of them. To run them unchanged, check out the original commit. If none of the selected test cases exist in the checkout, the CLI stops with an error and runs nothing. --rerun cannot be combined with --grep, --grep-invert, --last-failed, --test-list, --test-list-invert, --shard, or --split. Every re-run flag is listed in the Node.js CLI reference.

Re-run from an AI agent

Ask for it in your own words, for example “re-run the failed test cases from the last run”. The agent then asks you 2 things before anything starts:
  1. Which code to run. same-commit re-runs the code that failed, which tells you whether the failures are real or flaky. latest runs the branch tip, which tells you whether a fix you pushed since has worked. There is no default, so the agent has to ask.
  2. Your confirmation. Re-runs cost CI minutes, so rerun_test starts nothing until you say yes.
Before you answer, get_rerun_selection can tell the agent whether the re-run would go inside the original GitHub run, so that run’s red check can turn green, or start a separate workflow run. Ask for it if you want to know which you are getting. The agent needs the TestDino MCP server. Set it up on Remote or Local, and the parameters for both tools are in the MCP tools reference.

Troubleshooting

The project resolves npx tdpw to a CLI older than 2.7.0, which passes the flag through to Playwright. Upgrade @testdino/playwright to 2.7.0 or later.
The job log line that starts with TestDino: running the full command on this GitHub retry gives the reason. The usual causes are a workflow running npx playwright test instead of npx tdpw test, or @testdino/playwright older than 2.7.8. See Run only the failed test cases in each job.
The test run finished seconds ago and its results are still being read. The panel updates on its own and the CLI waits. This does not mean there is nothing to re-run.
Playwright cannot request a test case exactly when its title contains the › separator, or starts or ends with a space, a non-breaking space, or a line break. Those test cases are listed separately and left out of the selected count. Run them with your usual Playwright command, or rename the test case.
The workflow is missing a re-run input, or the GitHub App cannot start workflows. See Troubleshooting in Configure re-runs.

Debug with AI

Hand a failure to your coding agent from the same action row.

Flaky tests

How TestDino decides a test case is flaky.

Test run details

The run page this panel opens from.

Configure re-runs

Add the re-run inputs to a GitHub Actions workflow.
Last modified on October 10, 2026