Metraipolis › archive › dc_b299045290d7
Beyond Rule-Based Mutation Testing: Test-Aware Mutant Generation Using Large Language Models — arXiv:2609.35841
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2609.35841
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-07T16:24:49.816Z
- SHA-256 of the archived text
252c71f778514abe0b24f2bc648d3438a06fbc5a90233df4565194bad7933bb8- Stable URL of this page
https://metraipolis.com/documento/dc_b299045290d7
How to cite
Beyond Rule-Based Mutation Testing: Test-Aware Mutant Generation Using Large Language Models — arXiv:2609.35841 — arXiv (en), https://arxiv.org/abs/2609.35841 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_b299045290d7 (Metraipolis archive dc_b299045290d7, sha256 252c71f778514abe0b24f2bc648d3438a06fbc5a90233df4565194bad7933bb8)
BibTeX
@misc{dcb299045290d7,
title = {Beyond Rule-Based Mutation Testing: Test-Aware Mutant Generation Using Large Language Models — arXiv:2609.35841},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2609.35841},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_b299045290d7; sha256 252c71f778514abe0b24f2bc648d3438a06fbc5a90233df4565194bad7933bb8},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.35841. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Mutation testing evaluates test-suite adequacy by injecting synthetic faults into program code. However, traditional rule-based tools often generate large numbers of trivial, redundant, or equivalent mutants that limit their practical use for identifying gaps in a test suite. While recent large language model (LLM)-based approaches generate more realistic faults, most remain test-blind: The model sees only the source code and cannot reason about what existing tests already cover. We propose test-aware mutant generation, in which an LLM receives the problem statement, canonical solution and base tests in a single prompt, and must generate a nontrivial mutant that passes the base unit tests. We evaluate this approach across a set of five LLMs -- Gemini 3.1 Pro, Gemini 3 Flash, GPT 5.1 Codex Mini, GPT 4.1 Mini, Qwen3-32B -- on the HumanEval and MBPP benchmarks. The extended EvalPlus test suites serve as an automated oracle to verify whether surviving mutants represent genuine bugs. Test-aware prompting yields verified fault rates of 87.7% (HumanEval) and 79.1% (MBPP), meaning these mutants pass all base tests but are caught by the oracle. This vastly outperforms the matched test-blind prompting (which yields only 12.2% and 23.0%, respectively) and the traditional rule-based tool mutmut (4.4% and 5.7%). While fault subtlety (the fraction of extended tests a mutant fails) remains comparable across all three methods, test-awareness minimizes the computational cost per verified fault, compared to test-blind prompting. Exposing an LLM to existing unit tests shifts mutant generation from untargeted bug injection toward effective discovery of weaknesses in an existing test suite. Our work establishes a concrete foundation for future research to scale test-aware mutant generation to production-level environments. Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-30 in cs.AI). Categorie arXiv: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI). Pagina del lavoro: https://arxiv.org/abs/2609.35841 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-07T15:54:53.721Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-09-30?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).