TestSprite CLI is the command-line client for TestSprite, a hosted testing service that runs end-to-end tests against a live application in the cloud, driving a real browser or API rather than mocks. The CLI puts that service in a coding agent's hands: the agent creates a test for each behavior it ships, reruns the existing suite after changes, and reads failures back as structured output. People drive the same surface from a terminal or from CI.
The core loop is create, run, failure get, fix, rerun. When an agent changes code it checks whether the behavior is already covered: a new behavior becomes a new test, an existing one is replayed, and a failure is fetched as one self-consistent bundle (the failing step and its neighbors, screenshots, DOM snapshots, the test source, a root-cause hypothesis, and a recommended fix target, all sharing a single snapshot id). The CLI refuses to stitch data from two different runs. Every passing test is kept in a durable suite, so coverage accumulates across the life of the project.
Tests are authored as plan files (typed action and assertion steps) that can be scaffolded and linted offline, or TestSprite can propose test cases by exploring a deployed app or reading an uploaded API spec or PRD, staging proposals server-side for review before any are accepted. Frontend tests can reach an app running on the developer's machine through a TestSprite tunnel. A setup command installs an agent verification skill for the coding agents it detects, including Claude Code, Codex, Cursor, Cline, Antigravity, Kiro, Windsurf, and Copilot.
Output is scriptable: a stable JSON output mode, predictable exit codes, and a dry-run mode that exercises the full code path with canned data. On GitHub Actions a waited run annotates the PR checks tab with one error per failure and appends a results table to the job summary, and a JUnit XML sidecar or machine summary file can be written for any CI system.
Features
- Live-app testing: runs tests against a real browser or API in the cloud, not a mock
- Failure bundle: one self-consistent package per failing run with the failing step, screenshots, DOM snapshots, test source, root-cause hypothesis, and recommended fix target
- Durable suite: every passing test is banked and replayed on later changes, so coverage compounds as the project grows
- Plan files: tests are authored as typed action and assertion steps, scaffolded and validated offline without network or credentials
- Generated test proposals: TestSprite explores a deployed app or reads an uploaded API spec or PRD, stages proposed tests for review, and only runs the stages a project is missing
- Local tunnels: frontend tests reach an app running on the developer's machine through a TestSprite tunnel
- Run controls: rerun, flaky-stability scoring, wait, cancel, run diffs between two runs, and artifact download by run id
- Test lists and schedules: named cross-project collections with per-project environment pins, and cron schedules that auto-pause after repeated failures
- Environments and auth: named URL plus login bundles per project, static or auto-refresh backend credentials, and OTP or SSO sign-in modes
- Scriptable output: JSON output mode, documented exit codes, and a dry-run mode with canned data
- CI integration: PR check annotations and a results table on GitHub Actions, plus JUnit XML and machine-summary files for any CI
- Agent skills: a setup command installs a verification skill for Claude Code, Codex, Cursor, Cline, Antigravity, Kiro, Windsurf, and Copilot
