Hi HN,
I built a mutation testing tool that takes a different approach from the conventional one. I'm calling it Targeted Mutation Testing.
As AI coding has become more common, mutation testing has become more important. It has helped me a lot personally. But ever since I first learned about it, I've kept wondering if there was a smarter way to do it.
Targeted Mutation Testing observes a single test run and generates targeted mutants from what it sees.
Of course, observation-guided rules have their own limits, so you can also combine them with classic mutation rules when you want more coverage.
This post links to the Rust implementation, which I built first. I also built a JS/TS implementation:
https://github.com/t-k/targeted-mutation-ts What's interesting about the JS/TS version is that, by focusing on targeted mutants, mutation testing can become practical for E2E tests.
I took inspiration from SEMu, DSpot, the W-method, and Meta's ACH. I listed the links at the end.
Would love any feedback. Thanks for taking a look.
- Killing Stubborn Mutants with Symbolic Execution (SEMu): [https://arxiv.org/abs/2001.02941](https://arxiv.org/abs/2001.02941)
- Automatic Test Improvement with DSpot: [https://arxiv.org/abs/1811.08330](https://arxiv.org/abs/1811.08330)
- Testing Software Design Modeled by Finite-State Machines (W-method): [https://doi.org/10.1109/TSE.1978.231496](https://doi.org/10.1109/TSE.1978.231496)
- Mutation-Guided LLM-based Test Generation at Meta (ACH): [https://arxiv.org/abs/2501.12862](https://arxiv.org/abs/2501.12862)
Comments URL: [https://news.ycombinator.com/item?id=50667811](https://news.ycombinator.com/item?id=50667811)
Points: 1