{
  "id": 22980351,
  "title": "Killed any mutants lately?",
  "url": "https://urgent.news/2026/12/01/killed-any-mutants-lately",
  "topic": "world",
  "section": "World",
  "published": "2026-12-01T16:41:19.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://entropicthoughts.com/killed-any-mutants-recently"
  },
  "original_language": null,
  "account": "Mutation coverage is a crucial type of test coverage that tells us whether our test suite has gaps. Most people measure statement or branch coverage, but both are inadequate. To compute mutation coverage, we create numerous copies of the code with intentional bugs, known as mutations. We then run the entire test suite on each mutant. If the tests pass, it indicates a gap in the tests, as we inserted the bug ourselves. While perfect mutation coverage may be unattainable, most codebases we've tested have around 40% mutation coverage, leaving plenty of room for improvement.\n\nMutation testing reveals where the gaps in our tests are. For instance, consider a script that calculates how much each friend owes on a group expense. By adding automated tests, one can achieve 100% branch coverage, implying 100% statement coverage as well. However, if the tests still pass after the script is used, it means there are gaps in the test suite. Mutation testing will help identify these gaps. While some programming languages offer tools to automate mutation testing, it's rare to find a good solution for languages like awk, which is often used for simple text processing tasks.\n\nHowever, manually generating mutations or using language models to create them is feasible. This can help cover the entire technology stack at once, from templates and browser frontends to backend logic and database queries. Once we have identified the surviving mutants, we can work on adding or modifying tests to address the uncovered logic. Language models can also assist in pinpointing the reasons for test gaps and proposing changes to the test suite. The feedback loop is straightforward, as running a specific command allows us to determine if all gaps have been closed.",
  "summary": null,
  "summary_source": "publisher",
  "key_points": [
    "Mutation coverage measures test suite gaps",
    "Create mutated code copies with intentional bugs",
    "Most codebases have ~40% mutation coverage"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}