Large-scale, Independent and Comprehensive study of the power of LLMs for test case generation
Not on the map. Why?
Abstract (arXiv)
Unit testing is essential for software reliability, yet manual test creation is time-consuming and often neglected. Search-based software testing improves efficiency but produces tests with poor readability and maintainability, while LLMs show promise but lack comprehensive evaluation across reasoning-based prompting and real-world scenarios. This study presents the first large-scale empirical evaluation of LLM-generated unit tests at the full class level, analyzing four models (GPT-3.5, GPT-4, Mistral 7B, and Mixtral 8x7B) against EvoSuite across 216,300 test cases targeting Defects4J, SF110, and CMD. We evaluate five prompting techniques, ZSL, FSL, CoT, ToT, and GToT, assessing compilability, hallucination-driven failures, readability, coverage, and test smells. Reasoning-based prompting, particularly GToT, significantly enhances reliability and compilability, yet hallucination-driven failures remain persistent, with compilation failure rates reaching 86%. While LLM-generated tests are generally more readable than SBST outputs, recurring issues such as Magic Number Tests and Assertion Roulette hinder maintainability. These findings suggest that hybrid approaches combining LLM-based generation with automated validation and search-based refinement are necessary for production-ready results.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). First posted on arXiv 28 Jun 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 3.
4 papers.
- 2025Benchmarking LLMs for Unit Test Generation from Real-World Functionscited by 8
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Actioncited by 4
- 2024Toward Automated Validation of Language Model Synthesized Test Cases using Semantic Entropycited by 3
- 2025Autonomous Legacy Web Application Upgrades Using a Multi-Agent Systemcited by 1
- 2025Benchmarking LLMs for Unit Test Generation from Real-World Functions1 Aug 2025
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Action16 Jun 2025
- 2025Autonomous Legacy Web Application Upgrades Using a Multi-Agent System31 Jan 2025
- 2024Toward Automated Validation of Language Model Synthesized Test Cases using Semantic Entropy13 Nov 2024
Similar, not cited
Close in wording, no citation either way
- 2026LLMs taking shortcuts in test generation: A study with SAP HANA and LevelDB
- 2026On the risk of coding before testing: An empirical study on LLM-based test generation workflow
- 2026LLM vs. Human Unit Tests: Fault Detection on Real Python Bugs
- 2025AugmenTest: Enhancing Tests with LLM-Driven Oracles
- 2025Rethinking Testing for LLM Applications: Characteristics, Challenges, and a Lightweight Interaction Protocol
- 2025Test Case Generation from Bug Reports via Large Language Models: A Cognitive Layered Evaluation Framework
- 2026Synthesizing File-Level Data for Unit Test Generation with Chain-of-Thoughts via Self-Debugging
- 2025Can LLMs Generate Reliable Test Case Generators? A Study on Competition-Level Programming Problems