Chapter 10: Tests

Mutation score

The share of deliberate bugs your tests caught: killed divided by total. 18 of 30 is 60%. It measures how strong the tests are, not how right the code is.

It gives an agent a number to climb and a list of what to fix. It also can't see anything nobody asked for: tests can catch every mutant in code that solves the wrong problem.

Say it to your agent

“Report the mutation score per file, as killed / total, with the survivors listed. Treat anything under 70% on a changed file as blocking, and don't treat any score as proof that the behaviour is what I asked for.”

The workshop

Name a word, or describe what you mean in everyday language.