paper-with-me

Papers

Evaluating LLM-Based Test Generation Under Software Evolution

2026-03-24 · Sabaat Haroon, Mohammad Taha Khan, Muhammad Ali Gulzar arxiv

Large Language Models (LLMs) are increasingly used for automated unit test generation. However, it remains unclear whether these tests reflect genuine reasoning about program behavior or simply reproduce superficial patterns learned during training. If the latter dominates, LLM-generated tests may exhibit weaknesses such as reduced coverage, missed regressions, and undetected faults. Understanding how LLMs generate tests and how those tests respond to code evolution is therefore essential. We present a large-scale empirical study of LLM-based test generation under program changes. Using an automated mutation-driven framework, we analyze how generated tests react to semantic-altering changes (SAC) and semantic-preserving changes (SPC) across eight LLMs and 22,374 program variants. LLMs achieve strong baseline results, reaching 79% line coverage and 76% branch coverage with fully passing test suites on the original programs. However, performance degrades as programs evolve. Under SACs, the pass rate of newly generated tests drops to 66%, and branch coverage declines to 60%. More than 99% of failing SAC tests pass on the original program while executing the modified region, indicating residual alignment with the original behavior rather than adaptation to updated semantics. Performance also declines under SPCs despite unchanged functionality: pass rates fall to 79% and branch coverage to 69%. Although SPC edits preserve semantics, they often introduce larger syntactic changes, leading to instability in generated test suites. Models generate more new tests while discarding many baseline tests, suggesting sensitivity to lexical changes rather than true semantic impact. Overall, our results indicate that current LLM-based test generation relies heavily on surface-level cues and struggles to maintain regression awareness as programs evolve.

📄 PDF Abstract BibTeX arXiv:2603.23443

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Optimization of Test Case Generation using Genetic Algorithm (GA)

2016-12-28 · Ahmed Mateen, Marriam Nazir, Salman Afsar Awan

Testing provides means pertaining to assuring software performance. The total aim of software industry is actually to make a certain start associated with high quality software for the end user. However, associated with …

Evolutionary Algorithmssoftware testing

TestEvo-Bench: An Executable and Live Benchmark for Test and Code Co-Evolution

2026-07-02 · Jiale Amber Wang, Kaiyuan Wang, Pengyu Nie arxiv

Software tests and code evolve together: a code change should be followed by new or updated tests that record the new software behavior. Yet existing test generation and update benchmarks often isolate the test from the …

A System for Automated Unit Test Generation Using Large Language Models and Assessment of Generated Test Suites

2024-08-14 · Andrea Lops, Fedelucio Narducci, Azzurra Ragone, Michelantonio Trizio 외

Unit tests represent the most basic level of testing within the software testing lifecycle and are crucial to ensuring software correctness. Designing and creating unit tests is a costly and labor-intensive process that …

Code Generationsoftware testing

Evaluating LLM-Based 0-to-1 Software Generation in End-to-End CLI Tool Scenarios

2026-04-08 · Ruida Hu, Xinchen Wang, Chao Peng, Cuiyun Gao 외 arxiv

The evolution of Large Language Models (LLMs) has catalyzed a paradigm shift towards intent-driven software development, where autonomous agents are expected to design and deliver complete, runnable software systems from…

GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilities

2025-07-16 · Diganta Misra, Nizar Islah, Victor May, Brice Rauby 외 arxiv

The rapid evolution of software libraries poses a considerable hurdle for code generation, necessitating continuous adaptation to frequent version updates while preserving backward compatibility. While existing code evol…

Code GenerationCode Completion