top | item 28448710

(no title)

adolgert | 4 years ago

Mutation testing looks really fun until you use it. It has two problems, that false positives and false negatives abound, and that it doesn't scale well as code gets larger. Suppose you modify code, then how long does it take the mutation testing framework to retest the relevant code? On the other hand, mutations can do a good job of estimating test coverage. In particular, they can help to prioritize tests by finding tests that cover the most mutations.

discuss

order

julienmaring|4 years ago

I agree with you! I only used it on a minor part of the code such as services. It can help people to understand why they are testing

adolgert|4 years ago

"...understand why they are testing." That's interesting. There is an information-theoretic measure for test quality that asks how effective a test is by asking how closely it examines a test output. For instance, does it "smoke test" that the output isn't NULL, or does it look at a returned data structure and enforce invariants in detail. It's the flip-side of asking in how much detail a test exercises the code. Well, keep having fun. Testing is a great way to think about code.