Skip to content
#software testing Book Open access

Correct According to Whom? Auditing What LLM-Generated Tests Actually Check

Oct 2026 · Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering · 0 citations · 19 references

TL;DR

It is found that LLM-based approaches can generate incorrect, overspecified, or incomplete test suites in all configurations, and that the configuration has less of an effect on the generated tests than expected.

Abstract

Unit testing is an important part of the software development process. But unit testing can be time-consuming and tedious, and so many people have turned to LLM-based approaches to automate the process. The problem is, a passing LLM-generated unit test suite provides evidence only that the code is correct with respect to the LLM's understanding, not the developer's. Our concern is that LLM-based approaches might come up with their own definition of "correct" behavior, separate from what the developer intended. Therefore, in this work, we investigate if LLM-generated tests verify the scenarios developers actually expect. Specifically, we propose a benchmark, ScenarioBench, of expert-curated test scenarios for a subset of 30 methods from the Defects4J dataset. We generate tests for these 30 Defects4J methods using five different state-of-the-art LLM-based techniques, as well as Claude Code, simulating different common configurations in software development: when a natural language specification is available, when it is not, when the code is correct, and when the code is buggy. We systematically compare the generated tests to the expert-curated test scenarios, and we find that LLM-based approaches can generate incorrect, overspecified, or incomplete test suites in all configurations, and that the configuration has less of an effect on the generated tests than expected. Our findings demonstrate how a passing LLM-generated test suite can provide developers with a false sense of security that their software, either manually written or AI-generated, is correct.

Read PDF

Similar papers

#software testing Preprint Oct 2026

On the Risks of using LLM-Generated Tests for Regression Testing

The results reveal a fundamental risk of LLM-generated regression tests: without manual validation, they may encode faulty behavior as expected behavior, allowing bugs to persist across software revisions and largely evade developer-maintained test suites.

Mohammadali Charoosaei, Cedric Richter, Mike Papadakis · 0 citations
#software testing Preprint Sep 2026

On the Impact of Requirement Smells in LLM-Based Code Generation

The results suggest that increasing \textit{smell density} was generally associated with lower test-suite-based functional correctness, although non-smelly requirements could still produce faulty code, and motivates further investigation into task-dependent quality effects in LLM-assisted software engineering.

Hugo Villamizar, Jannik Fischbach, Mert Şahin et al. · 0 citations
Review Oct 2026

LLM-Based Test Generation: Information Sources, Generation Strategies, and Quality Evidence

Large language models are increasingly used to generate test scenarios, executable test suites, assertions, interaction sequences, and fuzzing infrastructure. These artifacts serve different purposes and rely on different sources of information about correct behavior. A test that increases implementation coverage, a te...

Yun-Hao Liang, Cheng-Guang Gan, Rui-Xuan Ying et al. · 0 citations
Open access Aug 2026

Improving Bug Detection in LLM-Generated Unit Tests: Revisiting Test-Oracle Reliability Across Modern Large Language Models

This paper presents a formal mathematical model for categorizing the outcome of generated-tests into four classes, a couple of basic metrics: Bug-Revealing Rate (BRR) and Bug-Validating Rate (BVR); and two basic statistical tests to ensure that the results are rigorous.

Zeyad Farooq Lutfi · 0 citations
#artificial intelligence Preprint Sep 2026

E2E-SWE: Benchmarking LLMs on Building Working Codebases from Scratch

E2E-SWE is introduced, a benchmark for evaluating whether coding agents can build complete, functional software repositories end to end and finds substantial variation in end-to-end repository generation ability, providing strong model differentiation while leaving considerable headroom for future progress.

Hantian Ding, Chloe Bi, Jia-Cheng Zhu et al. · 0 citations
#software testing Preprint Sep 2026

How effective are traditional test criteria at detecting bugs in large language models generated code?

An empirical study involving 5 Large Language Models and 4 benchmarks evaluates the effectiveness and efficiency of 3 widely used adequacy criteria: statement coverage, branch coverage, and mutation testing, finding that mutation testing only marginally outperforms traditional coverage criteria in both triggering and d...

Asma Hamidi, Michael Konstantinou, R. Degiovanni et al. · 0 citations

Related blog posts

Microsoft Research Blog Oct 12, 2026

Simulating student learning for better AI tutoring

StudentSim is a research system for evaluating and improving AI tutoring tools before they are tested with learners. It models how individuals may engage with tutors, giving feedback to improve tutor performance across subjects like chess, writing, and mathematics. The post Simulating student learning for better AI tutoring appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.