Create a test, run it against your live app, and read exactly what broke — in about 10 minutes.
By the end of this guide you’ll have created a test, run it against your live app, and read exactly what broke — no code on your side.
Prepend --dry-run to any command to try the surface offline with no API key. The CLI emits a canned sample matching the real response shape — useful for learning the structure before you have credentials.
testsprite init prompts for your API key, verifies it, and installs the TestSprite verification skill into your agent’s project configuration. Run it once per project.For CI or non-interactive environments:
The CLI only supports public http:// or https:// URLs. For localhost targets, use the MCP Server, which owns the tunnel that exposes your local app to the cloud runner.
Supply a plan file that describes the behavior to verify. The --plan-from flag accepts a JSON file with projectId, type, name, and a planSteps[] array. Then --run --wait triggers a real cloud run and blocks until the verdict:
The CLI runs the test against your live app using a real browser — not mocks — and returns a structured result:
exit 0 → test passedexit 1 → test failed or blocked
Your agent or CI pipeline branches on the exit code. The --output json shape is a stable contract you can parse.
Use --output json > result.json to capture the full result for downstream processing. The JSON includes a dashboardUrl field on completion that deep-links into the Portal for the human review.
First, get a one-screen triage card to orient yourself:
testsprite test failure summary test_3a9f21c7
testId test_3a9f21c7status failedfailureKind element_not_foundsnapshotId snap_9b2c...rootCauseHypothesis The "Place Order" button selector changed after the recent redesign.recommendedFixTarget checkout.tsx line 42 — button aria-label
Then download the full failure bundle:
testsprite test failure get test_3a9f21c7 --out ./.testsprite/failure
The bundle is self-contained: failing step and its neighbors, DOM snapshots rendered as text your agent can read, the test source, the root-cause hypothesis, and the recommended fix target — all sharing one snapshotId. Your agent reads the bundle and has everything it needs to fix the code without another round trip.
test failure get always fetches the latest failure for the test. If multiple runs are in flight at once, use testsprite test artifact get <run-id> to pin the bundle to a specific run by its runId.
Exit 0. The test is banked into the durable suite. The next time your agent ships a change, it reruns rather than recreates — coverage compounds into a lasting record of every requirement it has ever gotten right.
Auto-heal is on by default and uses a small amount of credit only when it actually repairs a drifted step — see Rerun & Auto-Heal.
Install the TestSprite verification skill into your agent’s project. testsprite init already did this, but you can re-run the agent install step standalone for any target:
testsprite agent install --target claude
.claude/skills/testsprite-verify/SKILL.md → written
The skill tells your agent when to run tests (after shipping a feature or fix), how to read the failure bundle, and how to loop until the test passes. From this point forward, your agent drives the create → run → failure get → fix → rerun loop without any human in the middle.
Agent Integration
All five supported agent targets (claude, cursor, cline, antigravity, codex) and how the skill works