3 ms·
Similar to bebugging is mutation testing which is randomly mutating a program and then looking for examples which still pass tests as an indication of test cove
by dan-robertson 4y ago
Similar to bebugging is mutation testing which is randomly mutating a program and then looking for examples which still pass tests as an indication of test coverage. Though many may be mutations that didn’t change semantics if your code is well tested.
I tried to hack some mutation testing together in a horrific way: I wrote some regexp source-code manipulation to replace all constants in the source code with variables and some code at the top to read those constants from stdin. Then run the tests and segfault if all the tests pass. Then a fuzzer like afl can be used to try to find mutations. Though these mutations would be relatively trivial (not eg swapping two dependant lines of code that lead to a rare race condition, but this is why it’s good to have a large set of different testing/debugging tools).