It's very handy to have around when working on tests for new modules, etc.
kragen 34 minutes ago [-]
Claude Opus 5.5 has really gotten me into mutation testing. It's definitely a lot slower than normal regression testing (you have to rebuild and rerun your whole regression test suite on each mutant, so you don't want to do it as often) but it has had salutary effects on the quality of the regression test suite. I had occasionally done tiny amounts of mutation testing informally before, and I'd sometimes practiced "test-first" coding where I run the test before implementing the functionality, which is a very lightweight version of mutation testing, but now I'm doing it enthusiastically.
On the plus side, computers are faster now, so it's possible to run quantities of regression tests that would have been unthinkable 20 years ago.
Garlef 1 hours ago [-]
I think mutation testing is a great, great technique ~ But it takes a very long time to run!
(At least that was my experience with ts/js and stryker in 2021 where i last used it)
aleksiy123 7 minutes ago [-]
It is I run them outside the normal cicd process as a daily cronjob.
I would say results are mixed.
They do catch real bugs, but also are generally very noisy. Expensive/long to run.
Imo I think mutation and similarly fuzz testing are best applied selectively.
Work best on self contained, complex logic. Parsers, serialises, transforms that kind of thing.
hmartin 17 minutes ago [-]
It should get much faster once TS 7.1 comes out with the needed API's!
mac3n 4 days ago [-]
i hhave a vague memory of an article title something like "Hunting Plastic Animals" from the 1970s or 80s about mutation testing. "Plastic animals" being the artifically introduced bugs, and "hunting" by the test suites.
hungryhobbit 14 minutes ago [-]
The irony here is that AI makes this easier ... while also making it less valuable.
What I mean is, except for literal typos, bugs aren't generally caused by one character being off. They're caused by (say) not remembering function X will do Y under condition Z.
So, it's a proxy: you find tests that fail to catch typos as a proxy for catching tests that might miss real issues.
But how good of a proxy is it? Will finding out if a bunch of my tests miss == becoming != tell me if my tests will catch me forgetting to pass that critical foo argument to my doBar? ¯\_(ツ)_/¯
The one thing we know mutation testing is good for is catching typos, and with AI writing all my code, typos are the last thing I worry about.
It's very handy to have around when working on tests for new modules, etc.
On the plus side, computers are faster now, so it's possible to run quantities of regression tests that would have been unthinkable 20 years ago.
(At least that was my experience with ts/js and stryker in 2021 where i last used it)
I would say results are mixed.
They do catch real bugs, but also are generally very noisy. Expensive/long to run.
Imo I think mutation and similarly fuzz testing are best applied selectively.
Work best on self contained, complex logic. Parsers, serialises, transforms that kind of thing.
What I mean is, except for literal typos, bugs aren't generally caused by one character being off. They're caused by (say) not remembering function X will do Y under condition Z.
So, it's a proxy: you find tests that fail to catch typos as a proxy for catching tests that might miss real issues.
But how good of a proxy is it? Will finding out if a bunch of my tests miss == becoming != tell me if my tests will catch me forgetting to pass that critical foo argument to my doBar? ¯\_(ツ)_/¯
The one thing we know mutation testing is good for is catching typos, and with AI writing all my code, typos are the last thing I worry about.