What rerun does
Rerun re-executes a test using what’s already saved — no new plan generation, no new code generation.| Test type | What rerun executes |
|---|---|
| Frontend tests | Replay the saved Playwright script verbatim against the live app. No cloud credits are charged for a clean verbatim replay. |
| Backend tests | Re-run the full dependency closure: producers first, then the named test, then teardown — in the correct wave order. |
Rerunning a test
--wait, the command returns once the rerun is accepted. With --wait, it blocks until passed, failed, blocked, or cancelled — same exit codes as test run --wait.
Control the polling ceiling:
Rerunning many
Rerun every test in a project at once:| Flag | Description |
|---|---|
--skip-terminal | Skip tests that are already in a terminal state (passed, failed, blocked, cancelled) |
--status <list> | Only rerun tests matching these statuses (comma-separated) |
--filter <substr> | Case-insensitive name substring filter |
--max-concurrency <n> | Max simultaneous reruns (1–100, default 50) |
Backend dependency closure
When you rerun a backend test, the CLI expands the run to include:- Producer tests — any test that
--producesa variable the named test--needs. - The named test itself.
- Teardown tests — any test tagged
--category teardownin the same project.
Auto-heal
Auto-heal is on by default for every frontend rerun, on every plan tier, when triggered through the CLI. When your app’s UI has shifted since the test was last written — a button was renamed, a form gained an extra field, navigation was restructured — the verbatim script would fail even though the underlying feature still works. Auto-heal detects that drift and repairs the script so the test passes. If the feature itself is broken, the test stays failed.Auto-heal is on by default for all CLI reruns. It consumes a small amount of credit only when healing actually repairs a step — a clean verbatim replay that passes is free. Opt out with
--no-auto-heal. See Billing & Plans for current rates.When auto-heal helps
When auto-heal helps
Minor UI refactors that moved or renamed things. A button relabeled from “Continue” to “Next”, a sidebar collapsed into a hamburger menu, a custom dropdown replaced with a design-system component. The feature still works; the saved script just refers to stale selectors or text. Auto-heal re-binds the test to the new UI in context and marks it passed.
When auto-heal doesn't help
When auto-heal doesn't help
A real product bug. The form rejects valid input, an API returns 500, the redirect lands on the wrong page. Auto-heal will attempt recovery and fail — the test stays failed. This is the correct outcome: auto-heal absorbs UI drift; it does not mask genuine regressions. Pull the failure bundle (
testsprite test failure get <test-id>) to triage what actually broke.Credits
| Action | Cost |
|---|---|
Fresh test run (frontend) | Charged per run |
Fresh test run (backend) | Free |
test rerun — verbatim replay passes | Free |
test rerun — auto-heal engages | a small amount of credit |
test rerun — backend closure | Free |
Exit Codes
See the full list of exit codes and what each one means.
Where to Go Next
Running Tests
Trigger fresh runs, override the target URL, and understand the full exit-code table
Reading Results
Pull failure bundles, step logs, and run history after a rerun
Exit Codes
Exit 12 and everything else the CLI can emit
Agent Integration
Wire the rerun loop into your coding agent’s verify-fix cycle