Design choices made by LLM-based test generators prevent them from finding bugs
Noble Saji Mathews, Meiyappan Nagappan
TL;DR
This paper questions the effectiveness of LLM-based test generators in revealing bugs, highlighting that many tools optimize for passing tests and increased coverage rather than bug detection. By evaluating three prominent tools (GitHub Copilot, Codium CoverAgent, and CoverUp) on real buggy Python code from the Refactory dataset, the authors show a high incidence of tests that validate faulty behavior instead of exposing it, with up to 68.1% of final test suites indicating bug validation. The study isolates how design choices—such as filtering out failing tests or emphasizing coverage—contribute to unreliable test quality and potential masking of defects. The results call for a redesign of LLM-based testing tools toward requirement-driven, oracle-aware strategies that genuinely aid developers in identifying and repairing bugs.
Abstract
There is an increasing amount of research and commercial tools for automated test case generation using Large Language Models (LLMs). This paper critically examines whether recent LLM-based test generation tools, such as Codium CoverAgent and CoverUp, can effectively find bugs or unintentionally validate faulty code. Considering bugs are only exposed by failing test cases, we explore the question: can these tools truly achieve the intended objectives of software testing when their test oracles are designed to pass? Using real human-written buggy code as input, we evaluate these tools, showing how LLM-generated tests can fail to detect bugs and, more alarmingly, how their design can worsen the situation by validating bugs in the generated test suite and rejecting bug-revealing tests. These findings raise important questions about the validity of the design behind LLM-based test generation tools and their impact on software quality and test suite reliability.
