@testsprite/testsprite-cli 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -49
- package/dist/commands/agent.js +16 -13
- package/dist/commands/auth.d.ts +19 -0
- package/dist/commands/auth.js +60 -24
- package/dist/commands/ci.d.ts +86 -1
- package/dist/commands/ci.js +436 -5
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.js +34 -20
- package/dist/commands/init.js +14 -11
- package/dist/commands/project-env.d.ts +11 -1
- package/dist/commands/project-env.js +408 -70
- package/dist/commands/project-sign-in.d.ts +60 -0
- package/dist/commands/project-sign-in.js +289 -0
- package/dist/commands/project.d.ts +14 -5
- package/dist/commands/project.js +110 -70
- package/dist/commands/schedule.d.ts +14 -0
- package/dist/commands/schedule.js +193 -15
- package/dist/commands/test.d.ts +123 -44
- package/dist/commands/test.js +2993 -636
- package/dist/commands/testlist.d.ts +10 -5
- package/dist/commands/testlist.js +217 -47
- package/dist/commands/tunnel.d.ts +26 -3
- package/dist/commands/tunnel.js +221 -18
- package/dist/commands/usage.d.ts +3 -0
- package/dist/commands/usage.js +12 -5
- package/dist/index.js +39 -50
- package/dist/lib/agent-targets.d.ts +3 -3
- package/dist/lib/agent-targets.js +2 -2
- package/dist/lib/billing-refusal.d.ts +43 -0
- package/dist/lib/billing-refusal.js +171 -0
- package/dist/lib/bundle.d.ts +5 -0
- package/dist/lib/bundle.js +43 -13
- package/dist/lib/ci-linkage.d.ts +90 -0
- package/dist/lib/ci-linkage.js +181 -0
- package/dist/lib/client-factory.d.ts +16 -2
- package/dist/lib/client-factory.js +37 -6
- package/dist/lib/config.d.ts +17 -0
- package/dist/lib/config.js +20 -1
- package/dist/lib/conflict-reason.d.ts +27 -3
- package/dist/lib/conflict-reason.js +53 -4
- package/dist/lib/credentials.js +56 -14
- package/dist/lib/dry-run/samples.d.ts +13 -1
- package/dist/lib/dry-run/samples.js +104 -7
- package/dist/lib/environment-tunnel.d.ts +109 -0
- package/dist/lib/environment-tunnel.js +465 -0
- package/dist/lib/errors.d.ts +18 -11
- package/dist/lib/errors.js +123 -14
- package/dist/lib/failing-fe-resolver.d.ts +1 -1
- package/dist/lib/failing-fe-resolver.js +3 -3
- package/dist/lib/gh-output.d.ts +1 -0
- package/dist/lib/gh-output.js +16 -4
- package/dist/lib/history-retention.d.ts +8 -0
- package/dist/lib/history-retention.js +24 -0
- package/dist/lib/http.d.ts +39 -19
- package/dist/lib/http.js +46 -24
- package/dist/lib/interrupt.d.ts +21 -13
- package/dist/lib/interrupt.js +32 -21
- package/dist/lib/junit-report.d.ts +18 -4
- package/dist/lib/junit-report.js +23 -5
- package/dist/lib/local-target.d.ts +14 -4
- package/dist/lib/local-target.js +48 -13
- package/dist/lib/output.js +15 -1
- package/dist/lib/plan-poll.d.ts +11 -11
- package/dist/lib/plan-poll.js +15 -16
- package/dist/lib/plans.types.d.ts +9 -9
- package/dist/lib/plans.types.js +3 -3
- package/dist/lib/poll.d.ts +2 -2
- package/dist/lib/poll.js +9 -3
- package/dist/lib/redact.d.ts +38 -0
- package/dist/lib/redact.js +140 -0
- package/dist/lib/render-error.d.ts +21 -5
- package/dist/lib/render-error.js +44 -0
- package/dist/lib/response-schemas.d.ts +54 -12
- package/dist/lib/response-schemas.js +88 -7
- package/dist/lib/runs.types.d.ts +68 -11
- package/dist/lib/secret-file.js +72 -14
- package/dist/lib/skill-nudge.d.ts +6 -1
- package/dist/lib/skill-nudge.js +32 -5
- package/dist/lib/target-url-preflight.d.ts +6 -4
- package/dist/lib/target-url-preflight.js +64 -51
- package/dist/lib/target-url.js +11 -11
- package/dist/lib/telemetry.d.ts +10 -8
- package/dist/lib/telemetry.js +24 -17
- package/dist/lib/testlist.types.d.ts +1 -0
- package/dist/lib/ticker.d.ts +9 -0
- package/dist/lib/ticker.js +111 -4
- package/dist/lib/tunnel-session.d.ts +16 -4
- package/dist/lib/tunnel-session.js +7 -5
- package/dist/lib/tunnel.types.d.ts +12 -2
- package/dist/lib/tunnel.types.js +2 -2
- package/dist/lib/v3-advisory.js +0 -1
- package/dist/lib/wait-exit.d.ts +8 -0
- package/dist/lib/wait-exit.js +76 -4
- package/dist/lib/workspace-status.d.ts +23 -0
- package/dist/lib/workspace-status.js +15 -0
- package/dist/vendor/tunnel-client/client.d.ts +15 -8
- package/dist/vendor/tunnel-client/client.js +477 -407
- package/dist/vendor/tunnel-client/config.d.ts +5 -5
- package/dist/vendor/tunnel-client/config.js +5 -5
- package/dist/vendor/tunnel-client/index.d.ts +4 -4
- package/dist/vendor/tunnel-client/index.js +4 -4
- package/dist/vendor/tunnel-client/types.d.ts +19 -34
- package/dist/vendor/tunnel-client/types.js +1 -0
- package/dist/vendor/tunnel-client/ws-compat.d.ts +13 -3
- package/dist/vendor/tunnel-client/ws-compat.js +70 -12
- package/dist/version-guard.d.ts +7 -1
- package/dist/version-guard.js +19 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/skills/testsprite-onboard.skill.md +8 -8
- package/skills/testsprite-verify.codex.md +59 -57
- package/skills/testsprite-verify.skill.md +53 -38
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# TestSprite Verification Loop
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Honor the user's explicit choice of CLI or MCP.
|
|
3
|
+
Run relevant tests and inspect failures before reporting. Skip docs/build-config
|
|
4
|
+
edits; missing credentials mean unverified. Honor the user's CLI/MCP choice.
|
|
6
5
|
|
|
7
6
|
## 1. Preflight and project
|
|
8
7
|
|
|
@@ -11,78 +10,82 @@ testsprite --version
|
|
|
11
10
|
testsprite auth status
|
|
12
11
|
```
|
|
13
12
|
|
|
14
|
-
If missing,
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
If missing, advise CLI install or `testsprite setup`. Find the project via
|
|
14
|
+
`$TESTSPRITE_PROJECT_ID`, `.testsprite/config.json`, then `testsprite project list
|
|
15
|
+
--output json`; ask if several match.
|
|
17
16
|
|
|
18
|
-
For a local app
|
|
17
|
+
For a local app without a project:
|
|
19
18
|
|
|
20
19
|
```bash
|
|
21
20
|
testsprite project create --type frontend --name "<repo name>" --local <port> --local-host <host>
|
|
22
21
|
testsprite test create --plan-from plan.json --project <projectId>
|
|
23
|
-
testsprite test run <
|
|
22
|
+
testsprite test run <id> <id> --local <port> --local-host <host> --output json
|
|
24
23
|
```
|
|
25
24
|
|
|
26
|
-
Local projects need V3 (V2-only: exit 7, `local-origin-requires-v3`).
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
Local projects need V3 (V2-only: exit 7, `local-origin-requires-v3`). Exploration
|
|
26
|
+
and `test plan generate` exit 6 before charge. Create plans with `test create
|
|
27
|
+
--plan-from` without `--run`; then run several ids with `--local`. Portal runs
|
|
28
|
+
are blocked free until `project update <id> --url https://…` sets a public URL.
|
|
29
|
+
For deployed projects use `project create --url`; empty suites can use `test plan
|
|
30
|
+
generate --project <id>` then `test plan accept`.
|
|
32
31
|
|
|
33
32
|
## 2. Run against the change
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
The CLI does not host apps. Create a deployed environment once; select it with
|
|
35
|
+
`--env <name>` or omit for Default. Unknown names list valid names. Use `--local
|
|
36
|
+
<port>` for local FE runs.
|
|
38
37
|
|
|
39
38
|
```bash
|
|
40
39
|
# Deployed frontend: create + run, or run an existing test
|
|
40
|
+
testsprite project env create <id> --name staging --url https://staging.example.com
|
|
41
41
|
testsprite test create --plan-from plan.json --run --wait \
|
|
42
|
-
--
|
|
43
|
-
testsprite test run <test-id> --
|
|
42
|
+
--env staging --timeout 600 --output json
|
|
43
|
+
testsprite test run <test-id> --env staging \
|
|
44
44
|
--wait --timeout 600 --output json
|
|
45
45
|
# Backend Python assertion
|
|
46
46
|
testsprite test create --type backend --name "Login rejects empty password" \
|
|
47
47
|
--project <id> --code-file /tmp/test.py --run --wait --timeout 600
|
|
48
48
|
# Deployed replay (V3 FE: 0.5 credit)
|
|
49
|
-
testsprite test rerun <test-id> --wait --output json
|
|
49
|
+
testsprite test rerun <test-id> --env staging --wait --output json
|
|
50
50
|
# Dependency batch; optional --filter <substring>
|
|
51
|
-
testsprite test run --all --project <id> --
|
|
51
|
+
testsprite test run --all --project <id> --env staging --wait --output json
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
A second
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
or
|
|
81
|
-
|
|
54
|
+
- Supported backends grant existing keys `run:tunnel`; a narrowed key without it
|
|
55
|
+
exits 3. Free-plan local runs work; V3 FE costs 0.5 credit. BE cannot use `--local`.
|
|
56
|
+
- `--local` implies `--wait` (1200 s per run; ordinary: 600). `--local-host`:
|
|
57
|
+
`localhost`, `127.0.0.1` (default), `::1`. A dead port exits 5 before charge;
|
|
58
|
+
`--skip-preflight` skips the probe. Environment `--url` rejects private hosts.
|
|
59
|
+
`--local` selects/creates `local-<port>`; a named `--env` must be local.
|
|
60
|
+
`--target-url` cannot combine with `--local`.
|
|
61
|
+
- Run local ids together (`test run <id> <id> … --local <port>`); `--all --project
|
|
62
|
+
<id> --local <port>` skips BE tests. One tunnel, 5 concurrent runs by default
|
|
63
|
+
(`--max-concurrency` 1–10). Five live bindings per user; `tunnel_binding_limit`
|
|
64
|
+
exits 11 without retry. Use `tunnel list` then `tunnel stop <id>` or `--all --confirm`.
|
|
65
|
+
- Keep early **stderr** `Run <runId>` receipts and any `Dashboard: <url>`.
|
|
66
|
+
Stdout is the JSON channel.
|
|
67
|
+
- An **owned** local timeout, Ctrl-C, or poll failure requests cancellation and
|
|
68
|
+
closes the tunnel. Before a terminal V3 FE verdict, the backend attempts a refund;
|
|
69
|
+
check `refund.status`: cancellation does not guarantee a refund.
|
|
70
|
+
`--no-cancel-on-interrupt` detaches, but the owned tunnel still closes.
|
|
71
|
+
- After an owned timeout, start a **new** `test run <test-id> --local <port>
|
|
72
|
+
--timeout 1800` (retain `--local-host`). `test wait` cannot reopen the tunnel;
|
|
73
|
+
ordinary/adopted waits can resume with `test wait <run-id>` if reachable.
|
|
74
|
+
- Keep `tunnel start` alive; borrow with `--local <port> --tunnel-client <uuid>`.
|
|
75
|
+
Adopted runs normally detach without cancellation or closing the owner's tunnel.
|
|
76
|
+
If the owner has disappeared during a run, cancellation is requested by default;
|
|
77
|
+
`--no-cancel-on-interrupt` skips it. A second connection with the same credential
|
|
78
|
+
takes over; the first exits **10**.
|
|
79
|
+
- Loopback environments need `--local <port>`. Bare CLI runs selecting one by
|
|
80
|
+
name or Default exit 6 (`tunnel-required`) before dispatch or charge. The Portal
|
|
81
|
+
shows no Run; backend requests are refused free. Schedules and test lists get
|
|
82
|
+
free BLOCKED results. A public `--env` or Default works regardless of earlier
|
|
83
|
+
tunnel runs. V3 local runs use the agent path, never saved-code replay, and
|
|
84
|
+
preserve saved code.
|
|
82
85
|
- `--wait` handles polling/backoff; do not wrap it in a retry loop.
|
|
83
|
-
- Backend Python runs top-to-bottom, not via pytest: call
|
|
84
|
-
The sandbox has stdlib, `requests`, `pytest`, `numpy`,
|
|
85
|
-
not
|
|
86
|
+
- Backend Python runs top-to-bottom, not via pytest: call `test_*` functions.
|
|
87
|
+
The sandbox has stdlib, `requests`, `pytest`, `numpy`, `scipy`; use HTTP,
|
|
88
|
+
not project imports or uninstalled packages.
|
|
86
89
|
- Backend `--produces`/`--needs` are repeatable; `--category teardown` marks cleanup.
|
|
87
90
|
Set dependencies with `test create` or edit with `test update`; do not delete
|
|
88
91
|
and recreate. Use `test run --all` for producer → consumer → teardown ordering
|
|
@@ -97,10 +100,9 @@ testsprite test artifact get <run-id> --out ./.testsprite/runs/<run-id>/
|
|
|
97
100
|
testsprite test steps <test-id> --run-id <run-id> --output json
|
|
98
101
|
```
|
|
99
102
|
|
|
100
|
-
Read
|
|
101
|
-
|
|
102
|
-
run
|
|
103
|
-
id from `test result <test-id> --history`. Report the verdict and dashboard link.
|
|
103
|
+
Read failing steps, screenshots and root cause. Bare `test steps <test-id>`
|
|
104
|
+
shows the latest run; pin the receipt's id. For empty latest steps, choose an
|
|
105
|
+
earlier run from `test result <test-id> --history`. Report verdict and dashboard.
|
|
104
106
|
|
|
105
107
|
Exits: 0 passed; 1 failed/blocked/cancelled; 3 auth/scope; 4 not found;
|
|
106
108
|
5 validation; 6 conflict/precondition; 7 timeout/unsupported; 10 unavailable;
|
|
@@ -115,4 +117,4 @@ testsprite test run <test-id> --dry-run --output json
|
|
|
115
117
|
testsprite test create --plan-from plan.json --dry-run --output json
|
|
116
118
|
```
|
|
117
119
|
|
|
118
|
-
Setup: `npm install -g @testsprite/testsprite-cli
|
|
120
|
+
Setup: `npm install -g @testsprite/testsprite-cli`; `testsprite setup`.
|
|
@@ -19,19 +19,19 @@ duplicating.
|
|
|
19
19
|
The CLI tests either a **deployed** URL or a frontend test running on this
|
|
20
20
|
machine — it doesn't build or host your environment either way. For a deployed
|
|
21
21
|
change, wait until it's live somewhere reachable (e.g. open the PR, let CI
|
|
22
|
-
deploy the preview/staging environment)
|
|
23
|
-
|
|
22
|
+
deploy the preview/staging environment). Create a named environment for its
|
|
23
|
+
public URL once, then select it with `--env <name>` on runs. Running earlier
|
|
24
|
+
verifies the previous build, not your change.
|
|
24
25
|
|
|
25
26
|
For a change that is only running locally, don't wait for a deployment: run
|
|
26
27
|
`testsprite test run <test-id> --local <port>` instead. It tunnels this
|
|
27
28
|
machine's own loopback address (`localhost` / `127.0.0.1` / `::1` — not a LAN
|
|
28
29
|
or RFC1918 address, and not a general local-network escape hatch) to the test
|
|
29
|
-
runner.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
(`testsprite project env list <projectId>` shows the names).
|
|
30
|
+
runner. It is for frontend tests only (a backend test's target is baked into
|
|
31
|
+
its generated code, so run it normally). Existing API keys work for local runs; no replacement key is
|
|
32
|
+
needed. `--local <port>` selects or creates the
|
|
33
|
+
project's `local-<port>` environment. With `--env <name> --local <port>`, that
|
|
34
|
+
named environment must also be local (`project env list <projectId>` shows names).
|
|
35
35
|
|
|
36
36
|
If the user explicitly named a tool (the CLI or the MCP), honor that choice
|
|
37
37
|
regardless of which one the change's reachability would otherwise suggest.
|
|
@@ -102,7 +102,7 @@ If no project exists for an app running only locally, bootstrap a frontend proje
|
|
|
102
102
|
```bash
|
|
103
103
|
testsprite project create --type frontend --name "<repo name>" --local <port> --local-host <host>
|
|
104
104
|
testsprite test create --plan-from plan.json --project <projectId>
|
|
105
|
-
testsprite test run <
|
|
105
|
+
testsprite test run <id> <id> --local <port> --local-host <host> --output json
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
Keep the app listening and use the same `--local-host` for creation and follow-up
|
|
@@ -112,8 +112,8 @@ The port probe fails with exit 5 if nothing listens (`--skip-preflight`
|
|
|
112
112
|
bypasses it). Local projects skip exploration: `test plan generate` is refused
|
|
113
113
|
before charge (exit 6), so use `test create --plan-from` without `--run`, then
|
|
114
114
|
`test run --local`. V2-only local-project creation is unsupported (exit 7).
|
|
115
|
-
Portal
|
|
116
|
-
|
|
115
|
+
The Portal shows local environments without a Run action. Create a public
|
|
116
|
+
environment for deployed apps and select it with `--env <name>`.
|
|
117
117
|
|
|
118
118
|
## 3. Decide what to test
|
|
119
119
|
|
|
@@ -368,73 +368,83 @@ Batch is **FE-only.** For 3 backend tests, run `test create --type backend
|
|
|
368
368
|
|
|
369
369
|
## 4. Run
|
|
370
370
|
|
|
371
|
-
For a deployed target,
|
|
372
|
-
that deployment contains the change.
|
|
371
|
+
For a deployed target, create its environment once, then use `--env <name>`
|
|
372
|
+
after that deployment contains the change. Omit `--env` for Default; an unknown
|
|
373
|
+
name fails with available names and never falls back. For a local change,
|
|
373
374
|
use `testsprite test run <test-id> --local <port>` (frontend only); it implies
|
|
374
375
|
waiting and defaults to 1200 seconds. Create a missing test from a plan first,
|
|
375
376
|
without `--run`, then run its id with `--local`.
|
|
376
377
|
|
|
377
378
|
```bash
|
|
379
|
+
# One-time setup for a deployed target
|
|
380
|
+
testsprite project env create <projectId> --name staging --url https://staging.example.com
|
|
381
|
+
|
|
378
382
|
# (a) existing test
|
|
379
|
-
testsprite test run <test-id> --
|
|
383
|
+
testsprite test run <test-id> --env staging --wait --timeout 600 --output json
|
|
380
384
|
|
|
381
385
|
# (a-rerun) replay of a deployed test (V3 FE: 0.5 credit). Replays saved code (auto-heal on — more
|
|
382
386
|
# lenient than a fresh run; for strict verification of a new change prefer `test run`).
|
|
383
387
|
# BE: dispatches the WHOLE dependency closure — producers and teardowns run too, not just <test-id>,
|
|
384
388
|
# so expect their side effects (fixtures re-created, teardown deletes) and extra runs in history.
|
|
385
|
-
testsprite test rerun <test-id> --wait --timeout 600 --output json
|
|
389
|
+
testsprite test rerun <test-id> --env staging --wait --timeout 600 --output json
|
|
386
390
|
testsprite test rerun <test-id> --skip-dependencies --wait --timeout 600 # BE: named test only
|
|
387
391
|
|
|
388
392
|
# (b-FE) new FE test from plan
|
|
389
|
-
testsprite test create --plan-from plan.json --run --wait --
|
|
393
|
+
testsprite test create --plan-from plan.json --run --wait --env staging --timeout 600
|
|
390
394
|
|
|
391
395
|
# (b-BE) new BE test from Python (backend create needs --project)
|
|
392
|
-
testsprite test create --type backend --name "..." --project <projectId> --code-file foo.py --run --wait --
|
|
396
|
+
testsprite test create --type backend --name "..." --project <projectId> --code-file foo.py --run --wait --timeout 600
|
|
393
397
|
|
|
394
398
|
# (b-BE coverage set with dependencies) create each test without --run, then one wave-ordered batch
|
|
395
|
-
testsprite test run --all --project <projectId> --wait --timeout 600 --output json
|
|
399
|
+
testsprite test run --all --project <projectId> --env staging --wait --timeout 600 --output json
|
|
396
400
|
testsprite test run --all --project <projectId> --filter <name-substr> --wait --timeout 600 # subset by name
|
|
397
401
|
|
|
398
402
|
# (c) FE coverage set — single-call create + run (FE-only)
|
|
399
403
|
testsprite test create-batch --plans plans.jsonl --run --wait \
|
|
400
|
-
--
|
|
404
|
+
--env staging --max-concurrency 3 --timeout 600 --output json
|
|
401
405
|
# Two-step alternative (inspect before running):
|
|
402
406
|
# testsprite test create-batch --plans plans.jsonl --output json
|
|
403
|
-
# then trigger each id: testsprite test run <test-id> --
|
|
407
|
+
# then trigger each id: testsprite test run <test-id> --env staging --wait --timeout 600
|
|
404
408
|
|
|
405
409
|
# (d-FE) refine + re-run
|
|
406
410
|
testsprite test plan put <test-id> --steps refined.json && \
|
|
407
|
-
testsprite test run <test-id> --
|
|
411
|
+
testsprite test run <test-id> --env staging --wait --timeout 600
|
|
408
412
|
|
|
409
413
|
# (d-BE) refine BE code + re-run. NOTE: if you reach for `test rerun` here instead, a BE rerun
|
|
410
414
|
# dispatches the full producer/teardown closure — use --skip-dependencies while iterating on one
|
|
411
415
|
# script (producers already verified this round), then finish with a closure run before reporting.
|
|
412
416
|
testsprite test code put <test-id> --code-file refined.py --expected-version <current-version> && \
|
|
413
|
-
testsprite test run <test-id> --
|
|
417
|
+
testsprite test run <test-id> --env staging --wait --timeout 600
|
|
414
418
|
```
|
|
415
419
|
|
|
416
420
|
Key behaviors:
|
|
417
421
|
|
|
418
|
-
- `--
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
+
- Environment `--url` must be public; the CLI rejects localhost, RFC1918 and
|
|
423
|
+
link-local addresses. For an app on this machine, use `--local <port>`
|
|
424
|
+
(frontend only). If the CLI can list the project's environments, a named
|
|
425
|
+
public environment plus `--local` fails before a tunnel opens; otherwise the
|
|
426
|
+
server refuses the same combination before dispatch. A local environment
|
|
427
|
+
without `--local` is refused before dispatch and costs nothing.
|
|
422
428
|
- `--wait` long-polls until terminal and handles its own backoff — don't wrap it
|
|
423
429
|
in a retry loop.
|
|
424
|
-
- `--local` implies `--wait`, with a default timeout of 1200 seconds (ordinary
|
|
425
|
-
waits default to 600). Run
|
|
426
|
-
invocations are fine, but `--all --local` is refused (exit 5). There are
|
|
430
|
+
- `--local` implies `--wait`, with a default timeout of 1200 seconds per run (ordinary
|
|
431
|
+
waits default to 600). Run several local frontend tests in ONE command (`test run <id> <id> … --local <port>`) instead of starting one process per test. `--all --project <id> --local <port>` runs frontend tests and reports backend tests as skipped. One tunnel serves the invocation; `--max-concurrency` defaults to 5 and caps at 10. There are
|
|
427
432
|
5 live tunnel bindings per user; `tunnel_binding_limit` is exit 11 and is not
|
|
428
433
|
auto-retried. Reuse a live tunnel with `--tunnel-client` or stop an unused one.
|
|
429
|
-
-
|
|
430
|
-
|
|
434
|
+
On a tunnel-limit error, run `testsprite tunnel list`, then `testsprite tunnel stop <id>`
|
|
435
|
+
or `testsprite tunnel stop --all --confirm` if every binding should be revoked.
|
|
436
|
+
- Keep the early **stderr** run-id receipts (`Run <runId>` for one test, `[i/N] <testId> → run <runId>` for a batch); `Dashboard: <url>` follows when supplied. Preserve each id even if
|
|
431
437
|
the wait later stops; stdout remains the normal JSON result channel.
|
|
432
|
-
- An **owned** local run
|
|
438
|
+
- An **owned** local run requests cancellation by default when waiting stops (timeout,
|
|
433
439
|
Ctrl-C, or a polling failure), then its tunnel closes. Read the reported
|
|
434
|
-
cancellation outcome.
|
|
440
|
+
cancellation outcome. For a V3 frontend run cancelled before a terminal verdict,
|
|
441
|
+
the backend attempts a refund. Inspect `refund.status`; cancellation does not
|
|
442
|
+
guarantee a refund.
|
|
435
443
|
`--no-cancel-on-interrupt` detaches instead, but the owned tunnel still closes.
|
|
436
|
-
|
|
437
|
-
|
|
444
|
+
An adopted run normally detaches without cancellation and never closes the
|
|
445
|
+
owner's tunnel. If the CLI confirms the owner has disappeared while the run is
|
|
446
|
+
active, it requests cancellation by default; `--no-cancel-on-interrupt` skips
|
|
447
|
+
that request.
|
|
438
448
|
A second `tunnel start` or process using the same credential takes over, and the first exits **10**.
|
|
439
449
|
- Exit codes: `0` = passed; `1` = failed / blocked / cancelled; `7` = timeout
|
|
440
450
|
or unsupported. An owned local timeout is inconclusive: start a **new**
|
|
@@ -442,9 +452,14 @@ Key behaviors:
|
|
|
442
452
|
`--local-host <host>` if used; do not suggest `test wait` for that closed tunnel. Resume **ordinary or adopted-tunnel**
|
|
443
453
|
waits with `testsprite test wait <run-id>` only while the target is reachable
|
|
444
454
|
(and the adopted tunnel's owner remains alive).
|
|
445
|
-
-
|
|
446
|
-
|
|
447
|
-
|
|
455
|
+
- Exit `13` (`FEATURE_GATED`) and exit `12` (`INSUFFICIENT_CREDITS`) are not retriable: show the user the server's message and the link from `nextAction` or JSON `links`, then stop.
|
|
456
|
+
- A local environment has a loopback URL and needs `--local <port>` from that
|
|
457
|
+
machine. A bare CLI run selecting it, explicitly or as Default, is refused
|
|
458
|
+
before dispatch without charge (`tunnel-required`, exit 6). The Portal shows
|
|
459
|
+
local environments but offers no Run; backend Portal requests are refused
|
|
460
|
+
without charge. Schedules and test lists targeting them get a free BLOCKED
|
|
461
|
+
result. A deployed environment selected with `--env <name>` or made Default
|
|
462
|
+
runs normally even if the test ran through a tunnel before. V3 local runs use
|
|
448
463
|
the agent path, never saved-code replay, and preserve the test's saved code.
|
|
449
464
|
- Batch: `create-batch --run --wait` creates the tests (FE-only) and fans
|
|
450
465
|
out triggers in one call (bounded by `--max-concurrency`), emitting
|