Open source · Quality & Testing

Mutation Test Scope Planner

Choose mutation test scope from risk and changed behavior.

v1.0.0 · Node.js 22+ · MIT

Browse the public repository · View releases

Offline, read-only planning from a complete exported function, dependency, and test-coverage map. It selects mutation targets and affected tests; it does not execute mutations or claim a mutation score.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.

Run the checked-in example

node bin/mutation-test-scope-planner.mjs --root examples/pass --input evidence.json
node bin/mutation-test-scope-planner.mjs --root examples/fail --input evidence.json
npm run check

Read the result

--help prints usage. Normal runs emit one JSON report on stdout and no other stdout text: exit 0=pass, 1=fail, 2=incomplete or invalid configuration. Invalid options or root produce empty stdout; an unreadable, undecodable, malformed, or out-of-root named input produces an incomplete report. The named input is realpath-confined to the root. UTF-8 decoding is strict; duplicate decoded JSON keys are rejected. Nothing is written.

Scope

Input ≤65,536 bytes, ≤100 functions, ≤200 dependencies, ≤100 tests, ≤100 coverage references per test, opaque IDs ≤128 UTF-16 units, JSON depth ≤16, and evaluation time ≤5,000 ms through an injected monotonic clock. secondsPerMutant is 1–3,600 and mutants is 0–1,000 per function; changed functions must have at least one candidate. Each inclusive maximum accepts N and rejects N+1. No implicit repository scan, source parsing, dynamic-call inference, mutation run, mutation score, or live CI integration is performed.