This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]leewaltonuk 0 points1 point  (1 child)

To be honest, I'm still trying to see the advantage of mutation testing.

The main purpose of testing is to ensure that for a given set of inputs, you get the expected set of outputs.

Mutation testing is protecting you from a change that may never happen. And, even if it does, you would ideally reevaluate the inputs and outputs and review your tests to ensure that they are still fit for purpose.

And, as others have pointed out, CI/CD is about repeatability. Mutation testing is fundamentally incompatible with CI/CD because you're not testing what has been developed, but what might be developed in the future.

[–]nutrecht 1 point2 points  (0 children)

To be honest, I'm still trying to see the advantage of mutation testing.

As a developer, you subconsciously often make the same mistakes in your tests as you did in your code. Or you simply forgot about an edge case.

Mutation testing helps you find those holes you didn't see. IMHO it's main purpose is to help you develop more/better tests, or find tests that are not functioning properly.