Mutation testing: check your tests by breaking your code

12 steps · about 3 h 50 min · Intermediate

  1. Mutation testing (article, Wikipedia, 15 min)

    It gives you the vocabulary first: mutants, operators, killed and survived, weak and strong mutation, and equivalent mutants.

  2. Mutation Testing - Software Testing - GeeksforGeeks (article, GeeksforGeeks, 10 min)

    A short step-by-step version of the process, from generating mutants to improving the tests.

  3. Calling All Mutants: Getting Started with Mutation Testing (video, YouTube, 20 min)

    A talk on where mutation testing fits in your overall testing strategy.

  4. Mutation Testing - Theory and Practice (video, YouTube (mutmut author), 30 min)

    The author of mutmut explains how the theory works in practice with Python.

  5. Mutation Testing - Testing in Python: Interactive Edition (tutorial, PAIML, 25 min)

    A hands-on first run where you find survivors and write tests that kill them, using boundary examples like > versus >=.

  6. mutmut - python mutation tester (doc, mutmut docs, 20 min)

    The official Python tool docs cover running mutmut, browsing mutants and configuring it for your project.

  7. GitHub - boxed/mutmut: Mutation testing system (repo, GitHub (boxed), 15 min)

    Use the source repo to try it on your own pytest project and to learn the pragma options for skipping code.

  8. Getting Started with Mutation Testing in python with mutmut (article, Codecov, 15 min)

    A worked example that reads the killed and survived counts and uses the diff view to understand a surviving mutant.

  9. Basic concepts (doc, PIT (pitest.org), 15 min)

    The Java tool's own explanation of mutators, mutants, timeouts and non-viable mutants shows how a real engine works.

  10. Test Your Tests: Mutation Testing in Java with PIT (article, JAVAPRO, 25 min)

    Shows a Java method that is fully covered but still broken, and runs PIT on it with Maven.

  11. Getting started (doc, Stryker Mutator, 20 min)

    Applies the same loop to JavaScript and TypeScript with a three-step official quickstart.

  12. Mutation Testing for Java with PIT: Stop Trusting Your Coverage Numbers (article, Loiane Groner, 20 min)

    The last step covers reading reports, setting a baseline score and running mutation tests in CI without slowing every build.