Skip to main content
Have your workspace API key and the staging URL of a deployed frontend ready. Substitute a user journey that works in your app wherever the example uses guest checkout.

Install and set up

From your repository root, install the CLI, paste your key into the setup prompt and confirm the workspace. If you’re already set up, start with auth status. Installation.

Find or create a project

Reuse an existing frontend project or create one and copy the returned projectId.
A new project starts empty. Set the variables below to your project ID and application URL, then add the first environment. It becomes the project default. For an existing project, testsprite project env list "$PROJECT_ID" shows the saved names you can use.
The example assumes a publicly reachable checkout. For a test account, see Environments. For a frontend on your machine, Local apps covers planning from a diff and running through a tunnel. For an API, use a backend project and attach its API specification when requesting tests. Creating tests.

Request and review a plan

Ask the project’s TestSprite agent to propose one test. It works on the project’s default environment, here staging. --steps shows what the proposed test would do and assert.
A plan in the terminal: the proposed test with its five steps, and testsprite apply as the next step
If the agent asks a question in a chat message, answer with testsprite reply "your answer". If it needs more time, follow it with testsprite status --wait --steps. Review the proposed actions and expected outcome. To request a revision, use testsprite reject "what should change". When the conversation shows the test plan you want to save, apply it from the same directory. The JSON field applied.tests contains the saved test IDs.

Run the saved test

Copy the test ID from applied.tests. Start the test against staging and wait for the verdict.
In the JSON output, runs[].runId identifies the execution. Each test that produced a result has its own results[].resultId. A completed passing run exits 0. A completed failed run exits 1 and still prints the results. If your wait times out, use testsprite run wait <run-id> to resume following the execution. Running tests.

Inspect the result

Use the run ID to list the execution’s results. Copy the result ID for the case you want to examine.
These fields are an excerpt from the CLI’s offline sample. You can reproduce it with testsprite --dry-run result get res_dryrun0001 --output json.
A successful result get means the CLI read the result. Check testStatus for the verdict. Use --out to keep the detail and available video, screenshots and page snapshots for this result.
If the application failed the expected behavior, fix it, deploy that build to staging, and run the same test ID again. If the assertion was wrong, ask the project’s agent for a correction, review it and apply the revised plan.

Coding agent integration

Give your coding agent the same verification workflow.

Reading results

Find earlier results and inspect sign-in or API failures.