Two kinds of tests
TestSprite has two test types, and the authoring model differs between them:
TestSprite stores and executes all test code as Python: frontend tests run as async Playwright scripts, backend tests as
requests + pytest-style assertions. Accordingly, test code put --language accepts only python.
Create a frontend test from a plan
projectId, type, name, and the planSteps array. Because everything is in the file, --project, --type, --name, --description, and --priority are ignored when --plan-from is set; use the fields inside the JSON instead.
Plan files must be ≤ 256 KB.
Example plan file structure:
testId, codeVersion, createdAt, and — when the backend supplies it — a dashboardUrl deep-linking to the Portal.
Create a backend test from code
--project, --type, and --name are all required.
Backend dependency authoring
Backend tests can declare the variables they produce and consume. TestSprite uses these declarations to determine run order — producers execute before consumers, and teardown tests run last — both ontest run --all and on rerun.
These flags are backend-only and are ignored for frontend tests.
Create and run in one command
Pass--run to trigger a cloud run immediately after the test is created. Add --wait to block until the run reaches a terminal status. Add --output json to get a machine-readable result your agent can parse.
$?. See Running Tests for the full run surface, including --timeout, --target-url, and how to resume a timed-out run with test wait <run-id>.
Creating many tests at once
Usetest create-batch to create up to 50 frontend tests in a single call. This command is frontend-only.
The server caps run triggers at 60 per minute per key. The CLI throttles to 50 per minute and auto-retries rate-limited requests — you do not need to handle this yourself.
Where to Go Next
Editing & Deleting Tests
Update metadata, replace a plan or code, and delete tests
Running Tests
Trigger runs, poll for verdicts, and handle timeouts
Reading Results
Fetch failure bundles, steps, and run history
Command Reference
Full flag listing for every command