Trigger a run
Pass a test ID to kick off a run immediately:--wait, the command returns as soon as the run is accepted by the backend — exit 0. You get a runId you can use later:
testsprite test wait <run-id> whenever you’re ready.
Wait for the verdict
Add--wait to block until the run reaches a terminal status:
--timeout <seconds> (range 1–3600, default 600):
--wait is used:
| Exit | Meaning |
|---|---|
| 0 | Run reached passed |
| 1 | Run reached failed, blocked, or cancelled |
| 7 | Timeout elapsed before a terminal status — resume with testsprite test wait <run-id> |
Resuming a run
If a run times out or you triggered it without--wait, resume polling with the run ID:
test wait accepts the same --timeout flag and emits the same exit codes as test run --wait. When a terminal status arrives, you see the run card:
Overriding the target URL
By default the run hits the URL stored on the project. Override it for a single run with--target-url:
http(s) address; localhost and private IPs are rejected before any network call (exit 5).
Common Issues
What to check if a URL is rejected
Testing against a
localhost target requires the MCP Server and its built-in tunnel, not the CLI. The CLI is designed for cloud-accessible environments and CI.Running a whole backend suite
Run every backend test in a project in a single wave-ordered batch:--all requires --project. The run respects dependency waves derived from --produces / --needs annotations set at test-creation time — producer tests run before the consumers that depend on their output variables.
Creating Tests
How to declare
--produces / --needs annotations| Flag | Type | Default | Description |
|---|---|---|---|
--all | bool | — | Run all BE tests in the project (wave-ordered) |
--project <id> | string | — | Required with --all |
--filter <substr> | string | — | Case-insensitive name filter |
--max-concurrency <n> | number | 50 | Max simultaneous triggers (1–100) |
Run status and exit codes
Everytest run and test wait exits with a code your script or agent can branch on:
| Exit code | Meaning |
|---|---|
| 0 | passed (or run queued without --wait) |
| 1 | failed, blocked, or cancelled |
| 3 | Auth error — check your API key or scopes |
| 4 | Test or run not found |
| 5 | Validation error — bad flag value or URL rejected |
| 6 | Conflict — this test already has a run in flight |
| 7 | Timeout — resume with testsprite test wait <run-id> |
| 10 | Transport failure — retriable |
| 11 | Rate limited — honor Retry-After |
Exit Codes
The full exit-code table, including codes for other commands
Exit 6 means a run is already in flight for this test. Wait for it to finish (or use
testsprite test wait <run-id>) before triggering another.The dashboard link
When a run completes, the CLI prints adashboard: line in text mode and includes dashboardUrl in JSON output. That link deep-dives directly into the Portal run view — steps, screenshots, analysis, and the full failure bundle — without any manual navigation.
dashboardUrl is absent under --dry-run.
Where to Go Next
Reading Results
Inspect steps, pull failure bundles, and navigate run history
Rerun & Auto-Heal
Replay a saved script cheaply, or let AI repair UI drift automatically
Exit Codes
Complete exit-code reference for scripts and CI pipelines
CI/CD Integration
Wire the CLI into GitHub Actions or any pipeline