@testsprite/testsprite-cli 0.14.0 → 0.16.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 +27 -17
- package/dist/commands/agent.js +7 -2
- package/dist/commands/auth.js +7 -3
- package/dist/commands/ci.d.ts +66 -17
- package/dist/commands/ci.js +486 -122
- package/dist/commands/completion.js +2 -1
- package/dist/commands/doctor.d.ts +3 -0
- package/dist/commands/doctor.js +52 -10
- package/dist/commands/init.js +25 -5
- package/dist/commands/project-env.js +39 -17
- package/dist/commands/project-sign-in.js +9 -4
- package/dist/commands/project.js +43 -22
- package/dist/commands/schedule.js +24 -15
- package/dist/commands/test.d.ts +105 -36
- package/dist/commands/test.js +1494 -847
- package/dist/commands/testlist.js +13 -3
- package/dist/commands/tunnel.js +23 -25
- package/dist/commands/usage.js +1 -0
- package/dist/index.js +14 -7
- package/dist/lib/agent-targets.d.ts +8 -3
- package/dist/lib/agent-targets.js +15 -4
- package/dist/lib/ci-run.d.ts +11 -0
- package/dist/lib/ci-run.js +34 -0
- package/dist/lib/client-factory.d.ts +23 -0
- package/dist/lib/client-factory.js +7 -6
- package/dist/lib/config.d.ts +1 -0
- package/dist/lib/config.js +1 -1
- package/dist/lib/conflict-reason.d.ts +24 -3
- package/dist/lib/conflict-reason.js +33 -2
- package/dist/lib/credentials.d.ts +0 -1
- package/dist/lib/credentials.js +51 -14
- package/dist/lib/deprecate.d.ts +22 -0
- package/dist/lib/deprecate.js +26 -0
- package/dist/lib/dry-run/samples.js +56 -5
- package/dist/lib/environment-tunnel.d.ts +2 -1
- package/dist/lib/environment-tunnel.js +1 -4
- package/dist/lib/first-suite-hint.d.ts +55 -0
- package/dist/lib/first-suite-hint.js +101 -0
- package/dist/lib/gh-output.d.ts +62 -4
- package/dist/lib/gh-output.js +149 -7
- package/dist/lib/github-context.d.ts +21 -0
- package/dist/lib/github-context.js +153 -0
- package/dist/lib/http.d.ts +10 -1
- package/dist/lib/http.js +29 -3
- package/dist/lib/junit-report.d.ts +3 -0
- package/dist/lib/junit-report.js +8 -1
- package/dist/lib/output.d.ts +11 -1
- package/dist/lib/output.js +17 -2
- package/dist/lib/plans.types.d.ts +1 -1
- package/dist/lib/response-schemas.d.ts +5 -1
- package/dist/lib/response-schemas.js +57 -0
- package/dist/lib/runs.types.d.ts +122 -0
- package/dist/lib/telemetry.d.ts +26 -2
- package/dist/lib/telemetry.js +47 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/schemas/plan.schema.json +2 -2
- package/skills/testsprite-ci.skill.md +154 -0
- package/skills/testsprite-verify.codex.md +7 -7
- package/skills/testsprite-verify.skill.md +24 -21
|
@@ -127,6 +127,7 @@ existing test already covers.
|
|
|
127
127
|
```bash
|
|
128
128
|
testsprite test list --project <projectId> --output json
|
|
129
129
|
testsprite test list --project <projectId> --status failed --output json # what's already red
|
|
130
|
+
testsprite test run --all --project <projectId> --status failed,blocked --wait --timeout 600 --output json # re-run what did not pass
|
|
130
131
|
```
|
|
131
132
|
|
|
132
133
|
Heuristic: a change to `src/components/CheckoutForm.tsx` is more likely covered
|
|
@@ -382,12 +383,9 @@ testsprite project env create <projectId> --name staging --url https://staging.e
|
|
|
382
383
|
# (a) existing test
|
|
383
384
|
testsprite test run <test-id> --env staging --wait --timeout 600 --output json
|
|
384
385
|
|
|
385
|
-
# (a-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
# so expect their side effects (fixtures re-created, teardown deletes) and extra runs in history.
|
|
389
|
-
testsprite test rerun <test-id> --env staging --wait --timeout 600 --output json
|
|
390
|
-
testsprite test rerun <test-id> --skip-dependencies --wait --timeout 600 # BE: named test only
|
|
386
|
+
# (a-several) several tests in one batch; --skip-dependencies (BE) runs only the named tests
|
|
387
|
+
testsprite test run <test-id> <test-id> --env staging --wait --timeout 600 --output json
|
|
388
|
+
testsprite test run <test-id> --skip-dependencies --wait --timeout 600
|
|
391
389
|
|
|
392
390
|
# (b-FE) new FE test from plan
|
|
393
391
|
testsprite test create --plan-from plan.json --run --wait --env staging --timeout 600
|
|
@@ -398,6 +396,7 @@ testsprite test create --type backend --name "..." --project <projectId> --code-
|
|
|
398
396
|
# (b-BE coverage set with dependencies) create each test without --run, then one wave-ordered batch
|
|
399
397
|
testsprite test run --all --project <projectId> --env staging --wait --timeout 600 --output json
|
|
400
398
|
testsprite test run --all --project <projectId> --filter <name-substr> --wait --timeout 600 # subset by name
|
|
399
|
+
testsprite test run --all --project <projectId> --status failed,blocked --wait --timeout 600 # only what did not pass
|
|
401
400
|
|
|
402
401
|
# (c) FE coverage set — single-call create + run (FE-only)
|
|
403
402
|
testsprite test create-batch --plans plans.jsonl --run --wait \
|
|
@@ -410,21 +409,21 @@ testsprite test create-batch --plans plans.jsonl --run --wait \
|
|
|
410
409
|
testsprite test plan put <test-id> --steps refined.json && \
|
|
411
410
|
testsprite test run <test-id> --env staging --wait --timeout 600
|
|
412
411
|
|
|
413
|
-
# (d-BE) refine BE code + re-run.
|
|
414
|
-
#
|
|
415
|
-
#
|
|
412
|
+
# (d-BE) refine BE code + re-run. A BE run dispatches the producer/teardown closure by default —
|
|
413
|
+
# use --skip-dependencies while iterating on one script (producers already verified this round),
|
|
414
|
+
# then finish with a closure run before reporting.
|
|
416
415
|
testsprite test code put <test-id> --code-file refined.py --expected-version <current-version> && \
|
|
417
416
|
testsprite test run <test-id> --env staging --wait --timeout 600
|
|
418
417
|
```
|
|
419
418
|
|
|
420
419
|
Key behaviors:
|
|
421
420
|
|
|
422
|
-
- Environment `--url`
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
421
|
+
- Environment `--url` takes a public http/https URL or a loopback http origin
|
|
422
|
+
with an explicit port (frontend only); private and link-local addresses are
|
|
423
|
+
refused. Running against a loopback environment opens a tunnel automatically
|
|
424
|
+
and waits, like `--local <port>`. `--env <name> --local <port>` sends that
|
|
425
|
+
environment's sign-in to your local app; the server applies it or refuses
|
|
426
|
+
before dispatch.
|
|
428
427
|
- `--wait` long-polls until terminal and handles its own backoff — don't wrap it
|
|
429
428
|
in a retry loop.
|
|
430
429
|
- `--local` implies `--wait`, with a default timeout of 1200 seconds per run (ordinary
|
|
@@ -481,13 +480,17 @@ Key behaviors:
|
|
|
481
480
|
tests (producers → consumers → `teardown` last); FE tests in the project are
|
|
482
481
|
skipped with an advisory, and everything not dispatched is enumerated
|
|
483
482
|
(`conflicts` / `deferred` / `skippedFrontend`) so don't count `accepted[]`
|
|
484
|
-
alone.
|
|
485
|
-
|
|
486
|
-
and
|
|
483
|
+
alone. A big batch is accepted whole and its runs show `queued` until they
|
|
484
|
+
start; `deferred` is rare (a project's lock stayed busy, or a test went in
|
|
485
|
+
flight during dispatch) and is never resent (exit 7). A BE run expands the
|
|
486
|
+
producer/teardown closure by default; failed
|
|
487
|
+
members surface as `closureFailures[]` without flipping the exit
|
|
487
488
|
code. Pass `--skip-dependencies` only when this round already verified the
|
|
488
489
|
producers and you're iterating fast on one script.
|
|
489
|
-
- `test code put
|
|
490
|
-
|
|
490
|
+
- `test code put`: `--expected-version <codeVersion>` is optional (the CLI
|
|
491
|
+
fetches the current version, which races with concurrent edits); stale etag → exit 6,
|
|
492
|
+
re-fetch via
|
|
493
|
+
`test get <id>` and retry. `--force` bypasses but is audit-logged.
|
|
491
494
|
- Idempotency: the CLI auto-mints an `Idempotency-Key`; replays within 24h return
|
|
492
495
|
the original test/run.
|
|
493
496
|
|
|
@@ -525,7 +528,7 @@ and runtime output: if the runtime output references a literal you submitted
|
|
|
525
528
|
earlier in the plan, the action succeeded and the error is runtime-phase.
|
|
526
529
|
|
|
527
530
|
**BE closure runs: root-cause the earliest failed wave, not the selected test.**
|
|
528
|
-
When a
|
|
531
|
+
When a `run` or `run --all` expanded a dependency closure and a **producer**
|
|
529
532
|
failed, every consumer downstream of it fails or blocks by starvation (missing
|
|
530
533
|
token / missing fixture). The selected test's red verdict does not implicate
|
|
531
534
|
your feature — report it as failed-downstream, pull the producer's artifact
|