mlsanityData to 14 Oct 2026

Beyond Rule-Based Mutation Testing: Test-Aware Mutant Generation Using Large Language Models

arXiv 2609.35841 ↗First posted 24 Sep 2026cs.SE cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 18 of its 28 references that are in the map. First posted on arXiv 24 Sep 2026.

Builds on

18 of 28 references.

References · 18

  1. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2021Program Synthesis with Large Language Modelscited by 3,637
  4. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  6. 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 64
  7. 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 38
  8. 2026SWE-Lego: Pushing the Limits of Supervised Fine-tuning for Software Issue Resolvingcited by 31
  9. 2026Vibe Code Bench: Evaluating AI Models on End-to-End Web Application Developmentcited by 9
  10. 2024LLMorpheus: Mutation Testing using Large Language Modelscited by 8
  11. 2026CodeTaste: Can LLMs Generate Human-Level Code Refactorings?cited by 8
  12. 2025Mutation-Guided Unit Test Generation with a Large Language Modelcited by 7
6 more
  1. 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generationcited by 7
  2. 2024Large Language Models for Equivalent Mutant Detection: How Far Are We?cited by 6
  3. 2023Challenging Bug Prediction and Repair Models with Synthetic Bugscited by 4
  4. 2024A Comprehensive Study on Large Language Models for Mutation Testingcited by 3
  5. 2025Mutation Testing via Iterative Large Language Model-Driven Scientific Debuggingcited by 3
  6. 2025Interactive Evaluation of Large Language Models for Multi-Requirement Software Engineering Taskscited by 3

Built on by

Not cited yet.