My problem with mutation testing is that in the limit, it requires your tests to be a re-implementation of the code. Furthermore, it means you spend a lot of your time testing the structure of the code rather than the logical behavior boundaries.
I think golden and property testing of the boundaries mixed with regression tests for actual bugs the code has really had are the ones where the tests pay for themselves in the long run. Everything else is speculative. Does the test cover a bug that would ever make it past the most cursory of reviews?
Like, let's just look at an example from the article, replacing a + with a -. There are a lot of cases where that will just result in an infinite loop. Just the cursory review of running the code once will catch that. Why are you rebuilding the program and test suite every time you run these tests just to introduce that bug?
Like, the only way I can see this being value-positive is if you don't read your code or tests... oh.
There's a nice symmetry between code and tests that is very under appreciated.
'Good code' is abstracted well, organized around underlying structure of the problem, extensible, maintainable, well named and organized. I think most people's conception of a 'good test suite' is that the coverage is very high, 100% and MC/DC and all that. That's not really what a good test suite is though. A good test suite is just like good code: abstracted well, organized around underlying structure of the problem... It is a mirror.
In the absolute ideal case, with a good test suite, one could reconstruct good code. And with a good codebase, one could write a good test suite. They are perfect mirrors of one another. In practice, if you have a 100% lcov test suite, typically all you can manage to do is recreate the exact structure of the existing code, bugs and all. This is what you are saying here and I absolutely agree.
LLM's make this far worse, imho. People use LLM's to write unit tests. Great, more code coverage!