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 iderforderlich

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 exact command/path (command=<value>, path=<value>, or stdin -)optional
--remove-index <n>Remove 1-based --list position (repeatable)optional
--listList linked tests without mutatingoptional
--update <value>Edit exact command or path=<value>optional
--update-index <n>Edit current 1-based --list positionoptional
--set-json <value>Metadata patch; null clears optional fieldsoptional
--runRun linked test commandsoptional
--match <value>Run matching command/path substringoptional
--only-index <n>Run 1-based --list positionoptional
--only-lastRun most recently added testoptional
--full-historyReturn all linked tests after a writeoptional
--acknowledge-linked-testsTrust current commands in this clone without executionoptional
--backgroundRun linked tests in managed background modeoptional
--timeout <seconds>Default run timeout in seconds (requires --run)optional
--progressEmit stderr run progress (requires --run; automatic in TTY)optional
--env-set <value>Set run environment (KEY=VALUE, repeatable)optional
--env-clear <value>Clear run environment (NAME, repeatable)optional
--shared-host-safeApply additive shared-host-safe run defaultsoptional
--pm-context <mode>PM test context: schema|tracker|auto|none (default: schema)optional
--override-linked-pm-contextOverride stored context with --pm-contextoptional
--workspace-context <mode>Source-workspace mode: source|isolated|snapshot (default: source)optional
--override-linked-workspace-contextOverride stored context with --workspace-contextoptional
--allow-untrusted-linked-testsExecute untrusted linked commands when project policy also permits itoptional
--fail-on-context-mismatchFail linked PM commands when context item counts differoptional
--fail-on-skippedTreat skipped linked tests as dependency failuresoptional
--fail-on-empty-test-runFail successful commands reporting zero executed testsoptional
--require-assertions-for-pmRequire assertion metadata for linked PM command testsoptional
--check-contextCheck PM context before executionoptional
--auto-pm-contextRoute mismatched PM tracker reads through tracker contextoptional
--measure <value>Record name=value[,unit=...][,threshold=...]; requires --runoptional
--metric-below <value>Return evidence below name=valueoptional
--metric-diff <name>Diff the latest two valuesoptional
--author <value>Mutation authoroptional
--message <value>History messageoptional
--forceForce ownership overrideoptional

Beispiele

pm item test pm-a1b2 --add "command=node scripts/run-tests.mjs test -- tests/unit/output.spec.ts,timeout_seconds=2400"

Verwandte Befehle