A Systematic Approach for Assessing Large Language Models' Test Case Generation Capability
Not on the map. Why?
Abstract (arXiv)
Software testing ensures the quality and reliability of software products, but manual test case creation is labor-intensive. With the rise of large language models (LLMs), there is growing interest in unit test creation with LLMs. However, effective assessment of LLM-generated test cases is limited by the lack of standardized benchmarks that comprehensively cover diverse programming scenarios. To address the assessment of LLM's test case generation ability and lacking dataset for evaluation, we propose the Generated Benchmark from Control-Flow Structure and Variable Usage Composition (GBCV) approach, which systematically generates programs used for evaluating LLMs' test generation capabilities. By leveraging basic control-flow structures and variable usage, GBCV provides a flexible framework to create a spectrum of programs ranging from simple to complex. Because GPT-4o and GPT-3-Turbo are publicly accessible models, to present real-world regular user's use case, we use GBCV to assess LLM performance on them. Our findings indicate that GPT-4o performs better on complex program structures, while all models effectively detect boundary values in simple conditions but face challenges with arithmetic computations. This study highlights the strengths and limitations of LLMs in test generation, provides a benchmark framework, and suggests directions for future improvement.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 23 of its 39 references that are in the map. First posted on arXiv 5 Feb 2025.
Builds on
23 of 39 references.
References · 23
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
- 2023Self-collaboration Code Generation via ChatGPTcited by 258
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 194
- 2023Structured Chain-of-Thought Prompting for Code Generationcited by 138
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 96
- 2023No More Manual Tests? Evaluating and Improving ChatGPT for Unit Test Generationcited by 82
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
11 more
- 2023SkCoder: A Sketch-based Approach for Automatic Code Generationcited by 40
- 2024TESTEVAL: Benchmarking Large Language Models for Test Case Generationcited by 40
- 2023CodeScope: An Execution-based Multilingual Multitask Multidimensional Benchmark for Evaluating LLMs on Code Understanding and Generationcited by 39
- 2024On the Evaluation of Large Language Models in Unit Test Generationcited by 34
- 2023Can Large Language Models Write Good Property-Based Tests?cited by 31
- 2023AceCoder: Utilizing Existing Code to Enhance Code Generationcited by 25
- 2023UNITE: A Unified Benchmark for Text-to-SQL Evaluationcited by 14
- 2023Automatic Generation of Test Cases based on Bug Reports: a Feasibility Study with Large Language Modelscited by 8
- 2024Automated Control Logic Test Case Generation using Large Language Modelscited by 6
- 2021On Introducing Automatic Test Case Generation in Practice: A Success Story and Lessons Learnedcited by 4
- 2024Investigating the Readability of Test Code: Combining Scientific and Practical Viewscited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.