Skip to main content
Use testsprite --help to list commands and testsprite <command> --help for the options and examples for one command.

Global flags

Command tree

Setup and account

Projects and environments

Create the project first, then give it an environment. The first environment becomes the default. In the examples, set PROJECT_ID to the ID printed by project create.
  • project list and project get <id> show project metadata. project update accepts a name, agent instructions and frontend locator preferences. Use project delete <id> --confirm to permanently remove a project.
  • project env create takes --url; for a frontend on this machine, --local <port> is shorthand for --url http://localhost:<port>. A backend project’s environment must point at a publicly deployed API. On a frontend environment set --sign-in public|account|otp|manual; use --username and --password-file for a test account. Change an existing environment’s sign-in mode in the Portal.
  • project env update <project-id> <name> can change the URL, account credentials, variables or name. --var KEY=VALUE sets a non-secret value. Use project env set-default <project-id> <name> to switch the default and project env delete <project-id> <name> --confirm to remove an environment.
  • On a backend environment, create and update accept --auth none|bearer|basic|apikey, --credential-file <path>, repeatable --header "Name: value", --header-file <path>, or --auto-auth-file <path> for a sign-in that refreshes the credential. Reads redact secrets.
See Environments for sign-in examples.

Plan and review tests

Follow-up commands use the conversation last selected in this folder. Pass --project <id> --conversation <id> to select it explicitly and --card <id> on apply or reject to identify the proposal. Use --no-wait on plan, reply, apply or reject to return immediately and status --wait to follow progress later.

Test definitions

test list follows all pages by default. Use --max-items <n> to cap the total, or --page-size <n> (1–100) and --starting-token <token> to fetch one page at a time. Cases have an id, slug, title, type, version and step count. Read the latest outcome with result list --test <test-id> --limit 1. Inspect generated code in the Portal.

Launch, wait and cancel

A project selector excludes positional test IDs and list selection. With no selector, run reads TESTSPRITE_PROJECT_ID. Named tests are grouped into one run per project, with up to 5,000 selected IDs per project. List runs use their saved project/environment bindings. run prints executions in runs[] and individual results in results[]. A launch can return before any result rows exist. A blocked, failed or cancelled result can be inspected by its resultId. To resume or cancel, use the execution’s runId.
Both commands accept several run IDs. Waiting uses one shared deadline (default 600 seconds). Cancellation covers queued work and later phases and returns per-result cancellation and refund outcomes. An already-finished or already-cancelled execution returns its current state. See Cancelling Runs.

Results and evidence

  • result list requires exactly one of --run or --test. Both accept --status with passed, failed, running, blocked or cancelled. Include cancelled explicitly to see cancelled results. Test history is newest first and accepts --env and --limit (1–100, default 20).
  • result get takes a result ID. Its JSON includes the error, cause, suggested fix, steps, failed step, video and any backend traceback and captured output. A successful read exits 0 for any verdict.
  • --out creates the directory and writes result.json and available evidence, including steps/ and sign-in evidence where available. --failed-only keeps failed steps and one neighbor on each side, or all steps if none failed. A partial download exits 10. See Reading Results.

Test lists and schedules

testlist create --name <name> creates a list. Use add or remove with the list ID and test IDs to change its members. Bind environments with repeatable --project-env <project-id>:<name> on create or update. testlist list and testlist get expose lastRunId and lastRunCreated when available. Deleting a list with --confirm also deletes its schedules. schedule create takes --name, --cron, --target-type project|testList and --target-id. A five-field cron uses UTC unless you set --timezone. A project schedule inherits the project’s default or can be pinned with --env. A list schedule uses the list’s bindings. Use schedule list, schedule get or schedule update --pause / --resume to manage it. View past schedule executions in the Portal. See Test Lists & Schedules.

CI

  • ci init github generates a GitHub Actions workflow. Select the project and saved environment with --project and --env. Use --path to choose the workflow filename. --set-secret writes or replaces the API key secret via gh in the chosen repository.
  • ci run selects a project, always waits, and gates on the verdict. Use --target-url for a preview URL or --wait-for-status and --target-url-template for a preview announced by a check. --fail-on-skipped fails the check for skipped tests. --summary-file writes the CI summary, and --report junit --report-file <path> adds JUnit XML. See CI/CD.

Coding agents and tunnels

  • agent list shows available targets and skills. agent install [targets...] writes guidance for your coding agent, and agent status checks the installed guidance. Refresh a stale target with agent install <target> --force. See Coding Agent Integration.
  • tunnel start opens a foreground tunnel. The agent opens an app on this machine through it while it plans, and run --env <name> --tunnel-client <id> with a project or test selector attaches a run to it. tunnel list shows active bindings, tunnel status <client-id> checks one and tunnel stop <client-id> revokes it. tunnel stop --all --confirm revokes all your bindings, including those used by other jobs. See Local Apps.