Skip to main content

Workspace

A workspace owns your projects, API keys and credits. testsprite auth status shows which workspace and permissions the active key uses. If you belong to several workspaces, configure a profile for each key. Authentication.

Project

A project holds frontend or backend tests and their environments. A new project has a projectId. Add an environment to specify where its tests should run. Projects.

Environment

An environment gives a deployment a name and stores its URL and sign-in settings. The first environment you add becomes the Default environment. Use --env <name> on a run to select a saved environment. The project’s agent works on the default environment unless your request names another. Environments. Set PROJECT_ID to the ID returned by project create.

Test

A test is a saved case with a title, version and steps. The project’s TestSprite agent proposes changes to it. Review the proposal and apply it to save the case in the suite. The case ID under id in test list and test get is the test ID you pass to run. Creating tests.

Run and Run ID

One run is one execution and can contain multiple tests. The run ID identifies that execution throughout its lifecycle. Each test result in it gets a separate result ID for reading its verdict and evidence. Running the same saved test again preserves its test ID and creates a new result. Running tests. The output of a run contains execution receipts under runs[] and individual outcomes under results[]. To find a case’s latest result in staging, use testsprite result list --test <test-id> --env staging --limit 1.

Status

result list --run reports the execution’s progress in run.status. A finished execution can contain a mix of passing and failing results. The testStatus field on each result is RUNNING, PASSED, FAILED, BLOCKED or CANCELLED. To list cancelled results, include cancelled in the --status filter. A saved test definition is available independently of any result. Reading results.

Result evidence

result get reads the outcome for a specific result ID. For browser failures it can include the failed step, page snapshots, screenshots and video. Backend results can include captured API output and a traceback. The result may also include a cause and suggested fix. Download the available files with testsprite result get <result-id> --out <directory>. Reading results.

Credits

Executions use the workspace’s credits. testsprite usage shows the workspace wallet. An insufficient balance returns exit code 12. Exit codes.

API key and scopes

An API key grants the CLI access to a workspace. Scopes control individual operations, such as read:tests for results, run:tests for execution and write:projects for creating environments. Check the active scopes with testsprite auth status. API keys.