4 ms·
> Let's write unit tests for unit tests! Tests for tests exist. One such technique is called "mutation testing" [1]. I don't know of any job that actually use
by the_af 6y ago
> Let's write unit tests for unit tests!
Tests for tests exist. One such technique is called "mutation testing" [1].
I don't know of any job that actually uses them, but they make sense to me: the tests need checks too, otherwise how do you know they are adding value? It's too easy to write worthless tests, see them pass, and get a false sense of security. Techniques such as mutation testing check how sensitive your tests are to actual bugs (or program changes): do they detect them? If not, they aren't useful.
[1] https://en.wikipedia.org/wiki/Mutation_testing https://en.wikipedia.org/wiki/Mutation_testing