Todos los comandos · 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.

Uso

pm item test [options] [command] <id>

Argumentos

<id>Item idobligatorio

Opciones

--add <value>Add verified isolated test (CSV/markdown or stdin)opcional
--add-json <value>Add verified isolated test (JSON object/array or stdin)opcional
--remove <value>Remove linked test entry by exact command/path (command=<value> and path=<value> preserve commas and equals signs; or - for stdin)opcional
--remove-index <n>Remove the 1-based linked-test index from --list order (repeatable)opcional
--listList linked tests without mutatingopcional
--runRun linked test commandsopcional
--match <value>Run only linked tests whose command/path contains this substringopcional
--only-index <n>Run only the 1-based linked-test index from --list orderopcional
--only-lastRun only the most recently added linked testopcional
--acknowledge-linked-testsTrust the item's current linked commands in this clone without executing themopcional
--backgroundRun linked tests in managed background modeopcional
--timeout <seconds>Default run timeout in secondsopcional
--progressEmit linked-test progress to stderr (always shown in TTY, opt-in for non-TTY)opcional
--env-set <value>Set environment variable(s) for linked-test runs (KEY=VALUE, repeatable)opcional
--env-clear <value>Clear environment variable(s) for linked-test runs (NAME, repeatable)opcional
--shared-host-safeApply additive shared-host-safe runtime defaults for linked-test runsopcional
--pm-context <mode>PM test context: schema|tracker|auto|none (default: schema)opcional
--override-linked-pm-contextForce run-level --pm-context to override per-linked-test pm_context_mode metadataopcional
--workspace-context <mode>Source-workspace mode: source|isolated|snapshot (default: source)opcional
--override-linked-workspace-contextForce run-level --workspace-context over per-linked-test metadataopcional
--allow-untrusted-linked-testsExecute untrusted linked commands when project policy also permits itopcional
--fail-on-context-mismatchFail linked PM commands when context item counts differopcional
--fail-on-skippedTreat skipped linked tests as dependency failuresopcional
--fail-on-empty-test-runTreat successful linked-test commands that report zero executed tests as failuresopcional
--require-assertions-for-pmRequire assertion metadata for linked PM command testsopcional
--check-contextPreflight linked PM command context diagnostics before executing commandsopcional
--auto-pm-contextAuto-remediate PM tracker-read context mismatches by routing those linked commands through tracker contextopcional
--measure <value>Record name=value[,unit=...][,threshold=...] evidence; repeatableopcional
--metric-below <value>Return evidence below name=valueopcional
--metric-diff <name>Diff the latest two valuesopcional
--author <value>Mutation authoropcional
--message <value>History messageopcional
--forceForce ownership overrideopcional

Ejemplos

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

Comandos relacionados