@testsprite/testsprite-cli 0.6.0 → 0.8.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 +52 -31
- package/dist/commands/agent.js +91 -45
- package/dist/commands/ci.d.ts +88 -0
- package/dist/commands/ci.js +429 -0
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +104 -8
- package/dist/commands/init.js +8 -0
- package/dist/commands/project.d.ts +78 -0
- package/dist/commands/project.js +429 -5
- package/dist/commands/schedule.d.ts +120 -0
- package/dist/commands/schedule.js +487 -0
- package/dist/commands/test.d.ts +176 -2
- package/dist/commands/test.js +2235 -609
- package/dist/commands/testlist.d.ts +88 -0
- package/dist/commands/testlist.js +753 -0
- package/dist/commands/tunnel.d.ts +72 -0
- package/dist/commands/tunnel.js +367 -0
- package/dist/index.js +113 -40
- package/dist/lib/agent-targets.d.ts +13 -4
- package/dist/lib/agent-targets.js +11 -2
- package/dist/lib/conflict-reason.d.ts +30 -0
- package/dist/lib/conflict-reason.js +45 -0
- package/dist/lib/credentials.js +42 -1
- package/dist/lib/cron.d.ts +40 -0
- package/dist/lib/cron.js +190 -0
- package/dist/lib/dry-run/samples.d.ts +9 -0
- package/dist/lib/dry-run/samples.js +293 -55
- package/dist/lib/errors.d.ts +9 -0
- package/dist/lib/errors.js +11 -0
- package/dist/lib/gh-output.d.ts +33 -1
- package/dist/lib/gh-output.js +97 -27
- package/dist/lib/http.d.ts +119 -0
- package/dist/lib/http.js +243 -2
- package/dist/lib/interrupt.d.ts +38 -13
- package/dist/lib/interrupt.js +130 -15
- package/dist/lib/junit-report.d.ts +20 -2
- package/dist/lib/junit-report.js +38 -5
- package/dist/lib/local-target.d.ts +95 -0
- package/dist/lib/local-target.js +184 -0
- package/dist/lib/plan-poll.d.ts +171 -0
- package/dist/lib/plan-poll.js +442 -0
- package/dist/lib/plans.types.d.ts +130 -0
- package/dist/lib/plans.types.js +31 -0
- package/dist/lib/poll-support.d.ts +26 -0
- package/dist/lib/poll-support.js +65 -0
- package/dist/lib/poll.d.ts +1 -0
- package/dist/lib/poll.js +2 -40
- package/dist/lib/proxy.d.ts +16 -0
- package/dist/lib/proxy.js +19 -1
- package/dist/lib/response-schemas.d.ts +20 -0
- package/dist/lib/response-schemas.js +55 -1
- package/dist/lib/run-progress.d.ts +41 -0
- package/dist/lib/run-progress.js +56 -0
- package/dist/lib/runs.types.d.ts +32 -3
- package/dist/lib/secret-file.d.ts +15 -0
- package/dist/lib/secret-file.js +82 -0
- package/dist/lib/target-url-preflight.d.ts +91 -0
- package/dist/lib/target-url-preflight.js +259 -0
- package/dist/lib/target-url.d.ts +63 -9
- package/dist/lib/target-url.js +283 -62
- package/dist/lib/telemetry.d.ts +11 -0
- package/dist/lib/telemetry.js +1 -0
- package/dist/lib/testlist.types.d.ts +77 -0
- package/dist/lib/testlist.types.js +9 -0
- package/dist/lib/ticker.d.ts +8 -0
- package/dist/lib/ticker.js +3 -0
- package/dist/lib/tunnel-session.d.ts +129 -0
- package/dist/lib/tunnel-session.js +232 -0
- package/dist/lib/tunnel.types.d.ts +54 -0
- package/dist/lib/tunnel.types.js +8 -0
- package/dist/lib/v3-advisory.d.ts +35 -22
- package/dist/lib/v3-advisory.js +44 -24
- package/dist/lib/wait-exit.d.ts +29 -0
- package/dist/lib/wait-exit.js +103 -0
- package/dist/vendor/tunnel-client/client.d.ts +83 -0
- package/dist/vendor/tunnel-client/client.js +871 -0
- package/dist/vendor/tunnel-client/config.d.ts +41 -0
- package/dist/vendor/tunnel-client/config.js +42 -0
- package/dist/vendor/tunnel-client/index.d.ts +9 -0
- package/dist/vendor/tunnel-client/index.js +9 -0
- package/dist/vendor/tunnel-client/lodash-lite.d.ts +14 -0
- package/dist/vendor/tunnel-client/lodash-lite.js +24 -0
- package/dist/vendor/tunnel-client/protocol.d.ts +60 -0
- package/dist/vendor/tunnel-client/protocol.js +143 -0
- package/dist/vendor/tunnel-client/types.d.ts +96 -0
- package/dist/vendor/tunnel-client/types.js +10 -0
- package/dist/vendor/tunnel-client/ws-compat.d.ts +206 -0
- package/dist/vendor/tunnel-client/ws-compat.js +316 -0
- package/dist/version-guard.d.ts +10 -7
- package/dist/version-guard.js +37 -9
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -1
- package/skills/testsprite-onboard.skill.md +60 -4
- package/skills/testsprite-verify.codex.md +22 -16
- package/skills/testsprite-verify.skill.md +27 -18
|
@@ -16,21 +16,22 @@ project's TestSprite suite; before writing a new one, check `testsprite test lis
|
|
|
16
16
|
for an existing test that already covers the behavior and extend it instead of
|
|
17
17
|
duplicating.
|
|
18
18
|
|
|
19
|
-
The CLI tests a **deployed** URL
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
change is only running locally
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
The CLI tests either a **deployed** URL or a frontend test running on this
|
|
20
|
+
machine — it doesn't build or host your environment either way. For a deployed
|
|
21
|
+
change, wait until it's live somewhere reachable (e.g. open the PR, let CI
|
|
22
|
+
deploy the preview/staging environment) and pass that URL as `--target-url`.
|
|
23
|
+
Running earlier verifies the previous build, not your change.
|
|
24
|
+
|
|
25
|
+
For a change that is only running locally, don't wait for a deployment: run
|
|
26
|
+
`testsprite test run <test-id> --local <port>` instead. It tunnels this
|
|
27
|
+
machine's own loopback address (`localhost` / `127.0.0.1` / `::1` — not a LAN
|
|
28
|
+
or RFC1918 address, and not a general local-network escape hatch) to the test
|
|
29
|
+
runner. Two constraints: frontend tests only (a backend test's target is baked
|
|
30
|
+
into its generated code, so run it normally), and it needs an API key with the
|
|
31
|
+
`run:tunnel` scope — a 403 there means mint a new key.
|
|
32
|
+
|
|
33
|
+
If the user explicitly named a tool (the CLI or the MCP), honor that choice
|
|
34
|
+
regardless of which one the change's reachability would otherwise suggest.
|
|
34
35
|
|
|
35
36
|
## When to skip
|
|
36
37
|
|
|
@@ -59,6 +60,11 @@ counts:
|
|
|
59
60
|
What does **not** count: unit tests / typecheck / lint; drafting a plan without
|
|
60
61
|
`--run`; asking the user to run it for you.
|
|
61
62
|
|
|
63
|
+
If the project has **no tests at all**, that's the `testsprite-onboard` skill's
|
|
64
|
+
job, not this one — seed a suite first (it can generate the proposals for you
|
|
65
|
+
with `testsprite test plan generate` / `test plan accept`, or author them by
|
|
66
|
+
hand). Seeding is a deliberate setup pass, not part of the verify loop.
|
|
67
|
+
|
|
62
68
|
If you can't satisfy this — no creds, no valid target URL, repo not linked —
|
|
63
69
|
**say so explicitly**: "Feature shipped but I could not run any TestSprite test
|
|
64
70
|
because <X>. Treat this as unverified until that's resolved." Don't claim done.
|
|
@@ -380,13 +386,16 @@ testsprite test run <test-id> --target-url <env-url> --wait --timeout 600
|
|
|
380
386
|
Key behaviors:
|
|
381
387
|
|
|
382
388
|
- `--target-url` must be an allowed project/environment URL. The CLI rejects
|
|
383
|
-
`localhost` / RFC1918 / link-local
|
|
384
|
-
|
|
389
|
+
`localhost` / RFC1918 / link-local there. If the feature is only running
|
|
390
|
+
locally, use `--local <port>` instead of `--target-url` (frontend tests
|
|
391
|
+
only, see "When to run" above) — don't skip the run over this.
|
|
385
392
|
- `--wait` long-polls until terminal and handles its own backoff — don't wrap it
|
|
386
393
|
in a retry loop.
|
|
387
394
|
- Exit codes: `0` = passed; `1` = failed / blocked / cancelled; `7` = timeout.
|
|
388
395
|
Treat `7` as inconclusive (resume with `testsprite test wait <run-id>`), not a
|
|
389
|
-
regression
|
|
396
|
+
regression — except a `--local` run: its exit 7 already cancelled the run
|
|
397
|
+
(the tunnel closes with the process, so there is nothing to resume), so
|
|
398
|
+
don't suggest `test wait` there; re-run with `--local` again instead.
|
|
390
399
|
- Batch: `create-batch --run --wait` creates the tests (FE-only) and fans
|
|
391
400
|
out triggers in one call (bounded by `--max-concurrency`), emitting
|
|
392
401
|
`{ results: [...] }` that mirrors the single-test `test run --wait`
|