mlsanityData to 7 Oct 2026

Evaluating LLM-Based Test Generation Under Software Evolution

arXiv 2603.23443 ↗First posted 24 Mar 2026cs.SE cs.AIcited by 2

Not on the map. Why?

Abstract (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.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 22 of its 45 references that are in the map. First posted on arXiv 24 Mar 2026.

Builds on

22 of 45 references.

References · 22

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2021Program Synthesis with Large Language Modelscited by 3,509
  3. 2020Extracting Training Data from Large Language Modelscited by 2,144
  4. 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,258
  5. 2021Deduplicating Training Data Makes Language Models Bettercited by 705
  6. 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
  7. 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 100
  8. 2025Nemotron 3 Nano: Open, Efficient Mixture-of-Experts Hybrid Mamba-Transformer Model for Agentic Reasoningcited by 85
  9. 2024Automated Unit Test Improvement using Large Language Models at Metacited by 73
  10. 2022Natural Attack for Pre-trained Models of Codecited by 72
  11. 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
  12. 2018The Art, Science, and Engineering of Fuzzing: A Surveycited by 61
10 more
  1. 2019Adversarial Examples for Models of Codecited by 61
  2. 2022Interactive Code Generation via Test-Driven User-Intent Formalizationcited by 50
  3. 2022Pynguin: Automated Unit Test Generation for Pythoncited by 49
  4. 2020On the Generalizability of Neural Program Models with respect to Semantic-Preserving Program Transformationscited by 41
  5. 2024Using Large Language Models for Commit Message Generation: A Preliminary Studycited by 10
  6. 2024A System for Automated Unit Test Generation Using Large Language Models and Assessment of Generated Test Suitescited by 8
  7. 2025Memorize or Generalize? Evaluating LLM Code Generation with Code Rewritingcited by 6
  8. 2026Automated Test Suite Enhancement Using Large Language Models with Few-shot Promptingcited by 2
  9. 2025Are the Majority of Public Computational Notebooks Pathologically Non-Executable?cited by 1
  10. 2025E-Test: E'er-Improving Test Suitescited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 2.

2 papers.