@seldonqa/cli 0.6.7 → 0.7.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 +74 -28
- package/bin/seldon +0 -0
- package/package.json +9 -7
- package/postinstall.cjs +9 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Seldon QA
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Write your QA test plan as code, then run AI agents that use your product like a real user — from your terminal or CI.**
|
|
4
4
|
|
|
5
|
-
`seldon`
|
|
5
|
+
`seldon` keeps a **baseline** of user-facing test cases in a committed `seldon.yml`. Point it at a live URL and autonomous agents exercise each case — click, type, navigate, verify — then hand back a clean, actionable report for you or your coding agent to act on.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install -g @seldonqa/cli
|
|
@@ -10,7 +10,7 @@ npm install -g @seldonqa/cli
|
|
|
10
10
|
|
|
11
11
|
## Why
|
|
12
12
|
|
|
13
|
-
AI is shipping more code than any team can test by hand. Seldon closes the gap:
|
|
13
|
+
AI is shipping more code than any team can test by hand. Seldon closes the gap: describe the journeys that matter once, in plain English, and agents run them against every deploy — telling you exactly what broke, why, and what to do about it.
|
|
14
14
|
|
|
15
15
|
## Get started
|
|
16
16
|
|
|
@@ -22,9 +22,10 @@ seldon login seldon_your_api_key # or: seldon config set-key <key>
|
|
|
22
22
|
From inside a project (one baseline per project):
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
seldon init #
|
|
26
|
-
seldon
|
|
27
|
-
|
|
25
|
+
seldon init # scaffold a template seldon.yml
|
|
26
|
+
seldon cases add --name "Login works" \
|
|
27
|
+
--step "go to /login" --step "sign in" --criteria "lands on the dashboard"
|
|
28
|
+
seldon validate # check the file locally (the server re-validates on run)
|
|
28
29
|
seldon run --url https://staging.example.com
|
|
29
30
|
seldon logs --follow # watch the agents test, live
|
|
30
31
|
seldon report --md # clean, actionable results
|
|
@@ -32,56 +33,101 @@ seldon report --md # clean, actionable results
|
|
|
32
33
|
|
|
33
34
|
## Highlights
|
|
34
35
|
|
|
35
|
-
- **
|
|
36
|
-
- **Agents that behave like users.** `seldon run` drives your live app and judges each case
|
|
36
|
+
- **Test plan as code.** Your cases live in a committed `seldon.yml` — reviewed in PRs, versioned with your app. `seldon init` scaffolds it; `seldon cases add` appends more.
|
|
37
|
+
- **Agents that behave like users.** `seldon run` drives your live app and judges each case **PASS / FAIL / BLOCKED / TIMED_OUT**.
|
|
38
|
+
- **Reports built for action.** Every failure carries an `expected` / `observed` pair and a single concrete **recommendation** — `--md` for pull requests, `--json` for coding agents, colorized plain text for the terminal.
|
|
37
39
|
- **Watch it think.** `seldon logs --follow` streams the agent's reasoning, framed by test case and step.
|
|
38
|
-
- **
|
|
39
|
-
- **Re-evaluate as code changes.** `seldon update` refreshes the plan when the code moves; pinned cases are always preserved.
|
|
40
|
+
- **Interrupt-safe.** A submitted run executes server-side. Press Ctrl-C and the CLI detaches without stopping the run — re-attach any time with `seldon report`.
|
|
40
41
|
- **CI-native gate.** `seldon run --fail-on fail` exits non-zero so a red QA run can block a merge.
|
|
41
42
|
|
|
42
43
|
## Configuration — `seldon.yml`
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
Your baseline is a single committed file at the project root — the plain-English cases themselves, not id overrides:
|
|
45
46
|
|
|
46
47
|
```yaml
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
name: web-app # optional lineage name; defaults to the git remote owner/repo
|
|
49
|
+
labels: [nightly, team-web] # optional run tags for profiling; merged with `--label`
|
|
50
|
+
run:
|
|
51
|
+
url: https://staging.example.com # default target; override per run with --url
|
|
52
|
+
username: qa@example.com # optional login the agent signs in with
|
|
53
|
+
password: hunter2 # optional; prefer a managed secret in prod
|
|
50
54
|
testCases:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
- name: Login works
|
|
56
|
+
id: login-works # optional stable id; defaults to a slug of the name
|
|
57
|
+
url: /login # optional per-case path (relative) or absolute URL override
|
|
58
|
+
steps:
|
|
59
|
+
- go to /login
|
|
60
|
+
- enter valid credentials and submit
|
|
61
|
+
criteria: the user is signed in and lands on the dashboard
|
|
54
62
|
```
|
|
55
63
|
|
|
64
|
+
## Reading a report
|
|
65
|
+
|
|
66
|
+
The report lists every case worst-first, then expands each failure:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Seldon QA — Checkout & account flows · 2/6 passed (33%) · ❌2 · 🚫1 · ⌛1
|
|
70
|
+
|
|
71
|
+
FAIL BLOCKER TC-201 Complete payment
|
|
72
|
+
BLOCKED TC-301 View order history
|
|
73
|
+
PASS TC-101 Add item to cart
|
|
74
|
+
|
|
75
|
+
TC-201 Complete payment
|
|
76
|
+
acceptance: A valid card places the order and shows a confirmation.
|
|
77
|
+
expected: Order is placed and a confirmation screen appears.
|
|
78
|
+
observed: The Pay button spins indefinitely; no order is created.
|
|
79
|
+
recommendation: Wire the Pay button's submit handler to /orders and surface a failure toast.
|
|
80
|
+
repro: Add an item, open /checkout, enter a valid card, click Pay
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- **Verdicts:** `PASS` · `FAIL` (a real defect, with a `severity`) · `BLOCKED` (couldn't be evaluated — e.g. a missing precondition) · `TIMED_OUT`.
|
|
84
|
+
- **recommendation** appears on `FAIL` / `BLOCKED` cases: the single strongest next step to get the case passing.
|
|
85
|
+
- `--full` expands every failing case (the terminal view caps at 5 by default); `--json` emits the same data as a stable object.
|
|
86
|
+
|
|
56
87
|
## In CI
|
|
57
88
|
|
|
58
89
|
```bash
|
|
59
90
|
seldon run --url "$PREVIEW_URL" --fail-on fail
|
|
60
91
|
```
|
|
61
92
|
|
|
62
|
-
`--fail-on fail` returns a non-zero exit code when any case fails;
|
|
93
|
+
`--fail-on fail` returns a non-zero exit code when any case fails; `--fail-on any` also gates on blocked or timed-out cases. Non-interactive shells block until the run finishes; `--no-wait` submits and returns immediately (re-read later with `seldon report`). With `--json` the report is stable, machine-readable output you can post to a pull request or hand a coding agent for an automated fix loop.
|
|
63
94
|
|
|
64
95
|
## Commands
|
|
65
96
|
|
|
66
97
|
| Command | What it does |
|
|
67
98
|
| --- | --- |
|
|
68
|
-
| `seldon init` |
|
|
69
|
-
| `seldon
|
|
70
|
-
| `seldon cases` |
|
|
71
|
-
| `seldon
|
|
72
|
-
| `seldon
|
|
73
|
-
| `seldon report [--md \| --json]` | Show the
|
|
99
|
+
| `seldon init` | Scaffold a template `seldon.yml` |
|
|
100
|
+
| `seldon cases add` | Append a test case (`--name` `--step …` `--criteria`) |
|
|
101
|
+
| `seldon cases` | List the cases in the current `seldon.yml` |
|
|
102
|
+
| `seldon validate` | Validate the file locally |
|
|
103
|
+
| `seldon run [--url <url>]` | Ingest `seldon.yml` and run it; `--no-wait` to detach, `--fail-on` to gate, `--label <tag>` to profile |
|
|
104
|
+
| `seldon report [--md \| --json] [--full]` | Show the report for the last run (or `--id <run>`) |
|
|
105
|
+
| `seldon logs --follow` | Stream the agent's live reasoning |
|
|
74
106
|
| `seldon runs` | List QA runs with color-coded status |
|
|
75
107
|
| `seldon cancel --id <run>` | Stop a run mid-flight |
|
|
76
|
-
| `seldon
|
|
77
|
-
| `seldon
|
|
78
|
-
| `seldon
|
|
108
|
+
| `seldon list` | List baselines your key can see |
|
|
109
|
+
| `seldon config` · `login` | Manage credentials and settings |
|
|
110
|
+
| `seldon api <operation>` | Call any Blok API operation directly |
|
|
79
111
|
|
|
80
112
|
Run `seldon --help` or `seldon <command> --help` for the full reference.
|
|
81
113
|
|
|
114
|
+
## Tagging runs for profiling
|
|
115
|
+
|
|
116
|
+
Attach freeform labels to a run — persistent ones in `seldon.yml` (`labels: [...]`) and per-invocation ones on the command line — to slice usage later:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
seldon run --label nightly --label team-web
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Labels are merged (file + flags), de-duplicated, and shown in `seldon runs` alongside each run.
|
|
123
|
+
|
|
124
|
+
## Staying up to date
|
|
125
|
+
|
|
126
|
+
`seldon --version` prints the installed version. When a newer release is available, the CLI shows a one-line upgrade nudge with the command that matches how you installed it — `npm install -g @seldonqa/cli` or `brew upgrade seldon`. The check is cached and never blocks a command; silence it with `NO_UPDATE_NOTIFIER=1` (it's already quiet in CI and when output is piped).
|
|
127
|
+
|
|
82
128
|
## Coding agents (MCP)
|
|
83
129
|
|
|
84
|
-
Seldon is also available as an MCP server, so coding agents can
|
|
130
|
+
Seldon is also available as an MCP server, so coding agents can author baselines, run them, and read reports directly — the same report you see, rendered as Markdown — enabling a closed test-and-fix loop. See [`@blok/mcp`](../mcp/README.md).
|
|
85
131
|
|
|
86
132
|
## Requirements
|
|
87
133
|
|
package/bin/seldon
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seldonqa/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Seldon QA - generate a QA test plan from any codebase and run AI agents against your live app, from your terminal or CI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"commander": "^12.1.0"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
|
-
"@seldonqa/cli-
|
|
36
|
-
"@seldonqa/cli-
|
|
37
|
-
"@seldonqa/cli-
|
|
38
|
-
"@seldonqa/cli-
|
|
39
|
-
"@seldonqa/cli-
|
|
35
|
+
"@seldonqa/cli-linux-arm64": "0.7.0",
|
|
36
|
+
"@seldonqa/cli-darwin-arm64": "0.7.0",
|
|
37
|
+
"@seldonqa/cli-win32-x64": "0.7.0",
|
|
38
|
+
"@seldonqa/cli-linux-x64": "0.7.0",
|
|
39
|
+
"@seldonqa/cli-darwin-x64": "0.7.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^20.14.0",
|
|
@@ -55,6 +55,8 @@
|
|
|
55
55
|
"typecheck": "tsc --noEmit",
|
|
56
56
|
"lint": "tsc --noEmit",
|
|
57
57
|
"test": "vitest run",
|
|
58
|
-
"test:live": "BLOK_LIVE=1 vitest run"
|
|
58
|
+
"test:live": "BLOK_LIVE=1 vitest run",
|
|
59
|
+
"bench": "vitest run bench",
|
|
60
|
+
"bench:live": "BLOK_LIVE=1 vitest run bench"
|
|
59
61
|
}
|
|
60
62
|
}
|
package/postinstall.cjs
CHANGED
|
@@ -47,6 +47,15 @@ function resolvePackageBin(pkgName, binName) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
function main() {
|
|
50
|
+
// Only copy the native binary when installed as a dependency (inside node_modules). In the source
|
|
51
|
+
// monorepo, __dirname is packages/cli — copying there would clobber the committed bin/seldon
|
|
52
|
+
// launcher placeholder with a ~100MB platform binary and risk it being committed (which shipped a
|
|
53
|
+
// stale binary inside the published stub). Dev uses `pnpm build`/`tsx`, not this native binary.
|
|
54
|
+
if (!__dirname.split(path.sep).includes("node_modules")) {
|
|
55
|
+
console.log("[seldon] Source workspace (not node_modules) — leaving bin/seldon launcher in place.");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
50
59
|
const key = getPlatformKey();
|
|
51
60
|
const entry = PLATFORMS[key];
|
|
52
61
|
if (!entry) {
|