mlsanityData to 7 Oct 2026

Large-scale, Independent and Comprehensive study of the power of LLMs for test case generation

arXiv 2407.00225 ↗First posted 28 Jun 2024cs.SEcited by 4

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

Cited by year

Citing papers per year: 2024: 1; 2025: 3.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026LLMs taking shortcuts in test generation: A study with SAP HANA and LevelDB
  2. 2026On the risk of coding before testing: An empirical study on LLM-based test generation workflow
  3. 2026LLM vs. Human Unit Tests: Fault Detection on Real Python Bugs
  4. 2025AugmenTest: Enhancing Tests with LLM-Driven Oracles
  5. 2025Rethinking Testing for LLM Applications: Characteristics, Challenges, and a Lightweight Interaction Protocol
  6. 2025Test Case Generation from Bug Reports via Large Language Models: A Cognitive Layered Evaluation Framework
  7. 2026Synthesizing File-Level Data for Unit Test Generation with Chain-of-Thoughts via Self-Debugging
  8. 2025Can LLMs Generate Reliable Test Case Generators? A Study on Competition-Level Programming Problems