Re-run requires the
@testdino/playwright npm package at 2.7.0 or later, and Playwright 1.56 or later. Check yours with npm ls @testdino/playwright. An earlier version exits with error: unknown option '--rerun'.Re-running inside the original GitHub run needs 2.7.8 or later. On an earlier version the failed jobs still re-run, in full.Quick Reference
Start a re-run from the dashboard
Re-run sits in the action row right of the tab strip on a test run’s page, next to Debug with AI. It appears once the test run has finished and carries at least 1 failed or flaky test case. A test run reportingpassed still shows it when the run carries flaky test cases.
The panel shows the count that will run as 7 of 9 selected, the code choice, and the workflow that will run it. The button states what happens:
The new test run appears in the run list once CI picks it up, marked Re-run of #N and linked to the run it came from. It carries 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.
Choose which test cases run
Custom appears when there is more than 1 test case to choose between. On large test runs it adds a search box and a group-by choice for spec file, failure reason, or browser.
Choose which code runs
Run against offers 2 options, and they answer different questions:
On a test run from GitHub Actions, This commit re-runs inside the original GitHub run instead of starting a new one. See Re-run inside the original GitHub run. Latest always starts a new workflow run.
For a re-run that starts a new workflow run, 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 does not declare
testdino_rerun_sha. A test run made outside CI with uncommitted changes keeps This commit, with a note that the re-run uses the commit as pushed, without those changes.
Latest is unavailable when the test run recorded no branch or the branch is gone; the re-run then dispatches on the default branch, still pinned to the original commit. When the branch tip is still the original commit, the panel says so: both options run the same code.
Re-run inside the original GitHub run
When the test run came from GitHub Actions, This commit re-runs its failed jobs as a new attempt of that same GitHub run. If they pass, that run and the commit’s check turn green, with no second workflow run in the commit’s check list. The panel says so before you click:The failed jobs run again inside GitHub run #124. If they pass, that run turns green. Only the failed tests run again.No workflow change is needed. This commit takes this path when all of these hold:
- The test run came from a GitHub Actions run in the repository connected to the project.
- The TestDino GitHub App has the Actions permission.
- The scope is Failed or Both. Flaky and Custom start a new workflow run instead.
Run only the failed test cases in each job
Each retried job runs only the test cases that failed in it when the job runsnpx tdpw test with @testdino/playwright 2.7.8 or later. Your job’s command stays the same.
Otherwise every test case in the failed jobs runs again, and the button reads Re-run failed jobs in full. The panel shows Every test in the failed jobs will run again with the change to make. The job log prints the reason on each full run.
How a re-run counts in your metrics
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.Add tags to a re-run
A re-run keeps the original test run’s run-level tags. A dashboard re-run starts as aworkflow_dispatch with no pull request context, so tags your workflow builds from the pull request still arrive, copied from the original. No workflow change is needed for this.
To label a single re-run, type tags into Extra tags in the panel, separated by commas, for example hotfix-retry. They are added on top of the inherited tags:
- At most 10 tags per re-run.
- Letters, digits and
. _ : / @ + -only, starting with a letter or digit. - When the combined list goes over the 50-tag limit per test run, the re-run’s own tags, extra tags included, are kept and the inherited ones are trimmed.
testdino_rerun_tags workflow input (see Enable the dashboard button) and @testdino/playwright 2.7.6 or later. On a workflow without the input, the panel refuses tags before anything starts.
A re-run inside the original GitHub run keeps that run’s tags and cannot add more. To tag a re-run, pick Latest to start a new workflow run.
Enable the dashboard button
Re-running inside the original GitHub run needs no workflow inputs. The rest of this section is for the other paths: Latest, the Flaky and Custom scopes, and any test run that did not come from GitHub Actions. Connect GitHub to the project in Project settings, under Integrations, and grant the TestDino GitHub App permission to start workflows. Then declare the re-run inputs on a workflow. Either shape works, because TestDino offers any active workflow that declarestestdino_rerun_from:
- Existing workflow
- Separate workflow
Add
workflow_dispatch and the inputs to the workflow you already run Playwright with. The if [ -n "$TD_RERUN_FROM" ] guard is what keeps a normal push unchanged: on a push the input is empty, so no re-run arguments are added..github/workflows/playwright.yml
The workflow file itself always comes from the branch tip, so a same-commit re-run runs the original test code under your current pipeline definition.
Re-run from the command line
Without a GitHub connection the panel gives you this command under Run manually, with the id lists filled in:--project, are skipped. The warning names them (up to 10) and the original test run by its number and commit, with a link to it. To run them unchanged, re-run on This commit or check out that commit. If none of them match, the CLI stops with an error rather than reporting a green test run that executed nothing.
CLI flags
--rerun is refused alongside a Playwright argument that would fight the selection: --grep, --grep-invert, --last-failed, --test-list, and --shard. Full flag reference in @testdino/playwright.
Re-run from an AI agent
rerun_test runs only after you have seen the selection and said yes, so an agent cannot spend CI minutes on its own. Parameters for both are in the MCP tools reference.
Troubleshooting
error: unknown option '--rerun'
error: unknown option '--rerun'
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 re-run ran every test, not just the failures
The re-run ran every test, not just the failures
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. A test case with no result from the earlier attempt, or the same Playwright project running in more than 1 job, also runs the whole job, and no setting changes that. See Run only the failed test cases in each job.No workflow is offered in the panel
No workflow is offered in the panel
No workflow on the branch declares a
testdino_rerun_from input, or the TestDino GitHub App lacks permission to start workflows. The panel falls back to the terminal command. See Enable the dashboard button.Results are still being processed
Results are still being processed
The test run finished seconds ago and its results are still being read. The panel updates itself; the CLI waits. This is not the same as having nothing to re-run.
Some test cases are listed as needing a manual run
Some test cases are listed as needing a manual run
Playwright identifies a test case by its full name, splitting the parts on
› and trimming each one, with no escape for either. A title containing that separator, or starting or ending with a space, a non-breaking space, or a line break, cannot be requested exactly.Those test cases are listed separately everywhere the selection appears, and the selected count excludes them, so a re-run never reports success for a test case it could not execute. Run them with your usual Playwright command, or rename the test case.GitHub shows the branch tip for a This commit re-run
GitHub shows the branch tip for a This commit re-run
GitHub starts a dispatched workflow from a branch, never a single commit, so the workflow run page shows the branch tip. The
ref: line in checkout then switches the job to the commit you picked. The HEAD is now at line in the checkout step’s log and the commit on the new test run in TestDino both show the pinned commit.To name the pinned commit on GitHub too, add a top-level run-name next to name: in the workflow. Other test runs keep their default title.Related
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.
GitHub Actions
Reporting Playwright results from GitHub Actions.