A project for a local-only app
Create a frontend project. Copy itsprojectId, then save the address where your app listens as an environment. The address may include the app’s entry path, such as http://localhost:3000/app.
--local 3000 is shorthand for --url http://localhost:3000.
Plan against the running app
In another terminal, start a tunnel and leave it running. The agent’s browser opens your app through it. Without a tunnel, the agent stops and asks for one: start it, then runtestsprite reply "The tunnel is running.".
--diff attaches your change and --file adds a requirements file.
local-dev is not the default, name it in your request, such as ”… on the local-dev environment”. Review the proposed tests and their assertions. Once the plan matches what you want, save it. apply prints the command that runs what it saved. You can also run the project against the local environment.
Automatic tunnel
A run on a saved loopback environment opens its own tunnel and waits for the verdict. Omit--env when the local environment is the project’s default.
run --local, run --local-host and run --target-url were removed in CLI 0.18.0. Backend tests need a publicly deployed API environment.
The CLI normally checks the listener before dispatch, waits for the verdict, and closes the tunnel on exit. --skip-preflight skips the listener check. An owned tunnel requests cancellation of its unfinished executions on Ctrl-C or timeout. --no-wait on an environment that requires an automatic tunnel is refused. A CLI-run loopback environment supports public access or username/password sign-in. Cancelling a Run
Several tests
Long-lived tunnels
To reuse one tunnel across runs, start it in a separate terminal. It prints a client ID and stays in the foreground. It is the same tunnel the agent uses while it plans.Tunnel limit
If a launch reaches the binding limit (exit11), run testsprite tunnel list. Reuse a connected binding or stop an unused one with testsprite tunnel stop "$CLIENT_ID". Stopping a binding disconnects any run relying on it.