braindump

Mutation Testing

Posts

Intro

Mutation testing is a technique that helps you test for multiple outcomes of a function. It analyses the code and make multiple assumptions to see if your code responds properly to the different outcomes.

It uses the “mutant” analogy. so your code should be able to “kill” all the mutants. if after running all the scenarios theres still mutants left, that means your code did not “pass”.

The difference between [[test coverage]] and mutation testing is that the metrics to measure test coverage are not checking thet the code should do what it supposed to do but if the code was executed or not. Which may or may not be useful depending on what code confidence means to you.

references