Pith. sign in

Mutation-Guided Unit Test Generation with a Large Language Model

3 Pith papers cite this work. Polarity classification is still indexing.

3 Pith papers citing it
abstract

Unit tests play a vital role in uncovering potential faults in software. While tools like EvoSuite focus on maximizing code coverage, recent advances in large language models (LLMs) have shifted attention toward LLM-based test generation. However, code coverage metrics -- such as line and branch coverage -- remain overly emphasized in reported research, despite being weak indicators of a test suite's fault-detection capability. In contrast, mutation score offers a more reliable and stringent measure, as demonstrated in our findings where some test suites achieve 100% coverage but only 4% mutation score. Although a few studies consider mutation score, the effectiveness of LLMs in killing mutants remains underexplored. In this paper, we propose MUTGEN, a mutation-guided, LLM-based test generation approach that incorporates mutation feedback directly into the prompt. Evaluated on 204 subjects from two benchmarks, MUTGEN significantly outperforms both EvoSuite and vanilla prompt-based strategies in terms of mutation score. Furthermore, MUTGEN introduces an iterative generation mechanism that pushes the limits of LLMs in killing additional mutants. Our study also provide insights into the limitations of LLM-based generation, analyzing the reasons for live and uncovered mutants, and the impact of different mutation operators on generation effectiveness.

fields

cs.SE 3

years

2026 3

verdicts

UNVERDICTED 3

representative citing papers

LLM-based Mockless Unit Test Generation for Java

cs.SE · 2026-05-26 · unverdicted · novelty 6.0

MocklessTester generates mockless Java unit tests using context mining and multi-level constraint fixing, improving coverage and mutation scores over baselines on Defects4J and Deps4J.

citing papers explorer

Showing 3 of 3 citing papers.

  • LLM-based Mockless Unit Test Generation for Java cs.SE · 2026-05-26 · unverdicted · none · ref 6 · internal anchor

    MocklessTester generates mockless Java unit tests using context mining and multi-level constraint fixing, improving coverage and mutation scores over baselines on Defects4J and Deps4J.

  • SWE-Mutation: Can LLMs Generate Reliable Test Suites in Software Engineering? cs.SE · 2026-05-21 · unverdicted · none · ref 95 · internal anchor

    SWE-Mutation benchmark shows current LLMs achieve low verification (10.20%) and detection (36.15%) rates on 2,636 mutated variants, exposing weaknesses in generating reliable test suites.

  • Call-Chain-Aware LLM-Based Test Generation for Java Projects cs.SE · 2026-04-23 · unverdicted · none · ref 38 · internal anchor

    CAT improves line coverage by 18% and branch coverage by 22% over prior LLM test generation methods by adding call-chain and dependency context from static analysis to prompts.