Alle Befehle · quality
pm item test
Manage tests linked to an item and optionally run them.
Links test commands/paths and optionally executes them for one item.
Aufruf
pm item test [options] [command] <id>Argumente
| <id> | Item id | erforderlich |
|---|
Optionen
| --add <value> | Add verified isolated test (CSV/markdown or stdin) | optional |
|---|---|---|
| --add-json <value> | Add verified isolated test (JSON object/array or stdin) | optional |
| --remove <value> | Remove linked test entry by exact command/path (command=<value> and path=<value> preserve commas and equals signs; or - for stdin) | optional |
| --remove-index <n> | Remove the 1-based linked-test index from --list order (repeatable) | optional |
| --list | List linked tests without mutating | optional |
| --run | Run linked test commands | optional |
| --match <value> | Run only linked tests whose command/path contains this substring | optional |
| --only-index <n> | Run only the 1-based linked-test index from --list order | optional |
| --only-last | Run only the most recently added linked test | optional |
| --acknowledge-linked-tests | Trust the item's current linked commands in this clone without executing them | optional |
| --background | Run linked tests in managed background mode | optional |
| --timeout <seconds> | Default run timeout in seconds | optional |
| --progress | Emit linked-test progress to stderr (always shown in TTY, opt-in for non-TTY) | optional |
| --env-set <value> | Set environment variable(s) for linked-test runs (KEY=VALUE, repeatable) | optional |
| --env-clear <value> | Clear environment variable(s) for linked-test runs (NAME, repeatable) | optional |
| --shared-host-safe | Apply additive shared-host-safe runtime defaults for linked-test runs | optional |
| --pm-context <mode> | PM test context: schema|tracker|auto|none (default: schema) | optional |
| --override-linked-pm-context | Force run-level --pm-context to override per-linked-test pm_context_mode metadata | optional |
| --workspace-context <mode> | Source-workspace mode: source|isolated|snapshot (default: source) | optional |
| --override-linked-workspace-context | Force run-level --workspace-context over per-linked-test metadata | optional |
| --allow-untrusted-linked-tests | Execute untrusted linked commands when project policy also permits it | optional |
| --fail-on-context-mismatch | Fail linked PM commands when context item counts differ | optional |
| --fail-on-skipped | Treat skipped linked tests as dependency failures | optional |
| --fail-on-empty-test-run | Treat successful linked-test commands that report zero executed tests as failures | optional |
| --require-assertions-for-pm | Require assertion metadata for linked PM command tests | optional |
| --check-context | Preflight linked PM command context diagnostics before executing commands | optional |
| --auto-pm-context | Auto-remediate PM tracker-read context mismatches by routing those linked commands through tracker context | optional |
| --measure <value> | Record name=value[,unit=...][,threshold=...] evidence; repeatable | optional |
| --metric-below <value> | Return evidence below name=value | optional |
| --metric-diff <name> | Diff the latest two values | optional |
| --author <value> | Mutation author | optional |
| --message <value> | History message | optional |
| --force | Force ownership override | optional |
Beispiele
pm item test pm-a1b2 --add "command=node scripts/run-tests.mjs test -- tests/unit/output.spec.ts,timeout_seconds=2400"