This is the original article, you can also find this article on my employer’s website.
When you write code you also write tests to prove that your code works, right? But how do you know your tests are correct? How to test your tests?
This is where Mutation Testing comes in. How does that work?
The concept of mutation testing is simple, when you run your tests faults are automatically seeded into your code. If your tests fail the mutation is killed, are your tests still green? Then the mutation lived. So you can measure the quality of your tests by the amount of mutation that are killed.
So you run your unit tests against automatically modified versions of your code. When the code changes different results will be produced and your tests should fail.