Pith. sign in

REVIEW 5 cited by

TestBench: Evaluating Class-Level Test Case Generation Capability of Large Language Models

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2409.17561 v1 pith:ED5MISNO submitted 2024-09-26 cs.SE

classification cs.SE
keywords testcontextmodelscasegenerationcasescorrectnessfull
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Software testing is a crucial phase in the software life cycle, helping identify potential risks and reduce maintenance costs. With the advancement of Large Language Models (LLMs), researchers have proposed an increasing number of LLM-based software testing techniques, particularly in the area of test case generation. Despite the growing interest, limited efforts have been made to thoroughly evaluate the actual capabilities of LLMs in this task. In this paper, we introduce TestBench, a benchmark for class-level LLM-based test case generation. We construct a dataset of 108 Java programs from 9 real-world, large-scale projects on GitHub, each representing a different thematic domain. We then design three distinct types of prompts based on context descriptions, including self-contained context, full context, and simple context. Besides, we propose a fine-grained evaluation framework that considers five aspects of test cases: syntactic correctness, compilation correctness, test correctness, code coverage rate, and defect detection rate. Furthermore, we propose a heuristic algorithm to repair erroneous test cases generated by LLMs. We evaluate CodeLlama-13b, GPT-3.5, and GPT-4 on the TestBench, and our experimental results indicate that larger models demonstrate a greater ability to effectively utilize contextual information, thus generating higher-quality test cases. Smaller models may struggle with the noise introduced by the extensive information contained within the full context. However, when using the simplified version, namely the simple context, which is derived from the full context via abstract syntax tree analysis, the performance of these models improves significantly. Our analysis highlights the current progress and pinpoints future directions to further enhance the effectiveness of models by handling contextual information for test case generation.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 5 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Benchmarking LLMs for Unit Test Generation from Real-World Functions

    cs.SE 2025-08 conditional novelty 6.0 of 10

    A new decontaminated benchmark of complex Python functions shows LLMs generate far fewer correct, covering, and bug-killing unit tests than on older benchmarks.

  2. PSearch: Search-based Patch Generation in the Era of LLM-based Automated Program Repair

    cs.SE 2025-07 conditional novelty 6.0 of 10

    PSearch applies Monte Carlo Tree Search to LLM patch generation with LLM and test-based rewards, fixing 201 Defects4J bugs and resolving 164 SWE-Bench-Lite issues.

  3. SAGE:Specification-Aware Grammar Extraction for Automated Test Case Generation with LLMs

    cs.CL 2025-06 conditional novelty 6.0 of 10

    SAGE combines supervised fine-tuning and GRPO reinforcement learning to generate CCFG grammars from competitive programming specs, achieving 96.66% set-based validity and 80.67% set-based effectiveness on 240 held-out...

  4. HardTests: Synthesizing High-Quality Test Cases for LLM Coding

    cs.CL 2025-05 conditional novelty 6.0 of 10

    HardTestGen generates higher-precision, higher-recall test suites for 47,136 competitive programming problems, improving test precision by 11.3 points and recall by 17.5 points over TACO and CodeContests when judging ...

  5. CLOVER: A Test Case Generation Benchmark with Coverage, Long-Context, and Verification

    cs.SE 2025-02 conditional novelty 6.0 of 10

    CLOVER is a new Python unit-test-generation benchmark with 845 problems, contexts up to 128k tokens, and coverage-based retrieval, where all 14 evaluated models score below 35% on the hardest task.

Pith tools