Measure test-suite strength with mutation testing

8 steps · about 3 h 3 min · Intermediate

  1. Learn the mutation-testing workflow (guide, Stryker Mutator documentation, 25 min)

    See how deliberate code changes reveal tests that execute code without checking its behavior.

  2. Inspect the mutations a tool can make (guide, Stryker Mutator documentation, 20 min)

    Understand which operators alter conditions, expressions, returns and other observable behavior.

  3. Interpret mutant states and scores (reference, Stryker Mutator documentation, 18 min)

    Separate survivors worth investigating from timeouts, errors and mutants with no coverage.

  4. Run a small JavaScript experiment (guide, Stryker Mutator documentation, 30 min)

    Configure one bounded module first so feedback arrives quickly and remains explainable.

  5. Tune the mutation scope (reference, Stryker Mutator documentation, 25 min)

    Limit files, thresholds and concurrency so the experiment fits local and CI resources.

  6. Compare the workflow in a Java project (guide, PIT Mutation Testing documentation, 25 min)

    Recognize the same concepts in a second mature implementation rather than tying them to one ecosystem.

  7. Diagnose equivalent and stubborn mutants (reference, PIT Mutation Testing documentation, 20 min)

    Learn why some surviving changes do not alter observable behavior or are unusually costly to kill.

  8. Make repeated CI runs affordable (guide, Stryker Mutator documentation, 20 min)

    Reuse earlier results carefully so mutation testing can protect changed code without testing everything every time.