Papers › TESTEVAL: Benchmarking Large Language Models for Test Case Generation

TESTEVAL: Benchmarking Large Language Models for Test Case Generation

6 Jun 2024arXiv:2406.04531links table onlyarchive 2025-07-28

Wenhan Wang, Chenyuan Yang, Zhijie Wang, Yuheng Huang, Zhaoyang Chu, Da Song, Lingming Zhang, An Ran Chen, Lei Ma

The archive published only this paper's code-link row. Authors, date and abstract are from arXiv's metadata (CC0), read from the Kaggle arXiv metadata snapshot of 2026-09-12 where its title matched the archive's; the title is the archive's.

Testing plays a crucial role in the software development cycle, enabling the detection of bugs, vulnerabilities, and other undesirable behaviors. To perform software testing, testers need to write code snippets that execute the program under test. Recently, researchers have recognized the potential of large language models (LLMs) in software testing. However, there remains a lack of fair comparisons between different LLMs in terms of test case generation capabilities. In this paper, we propose TESTEVAL, a novel benchmark for test case generation with LLMs. We collect 210 Python programs from an online programming platform, LeetCode, and design three different tasks: overall coverage, targeted line/branch coverage, and targeted path coverage. We further evaluate sixteen popular LLMs, including both commercial and open-source ones, on TESTEVAL. We find that generating test cases to cover specific program lines/branches/paths is still challenging for current LLMs, indicating a lack of ability to comprehend program logic and execution paths. We have open-sourced our dataset and benchmark pipelines at https://github.com/LLM4SoftwareTesting/TestEval.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2406.04531")

Code

Syntology Ran 10 of 15 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 10 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

llm4softwaretesting/testeval officialmentioned in paperMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 10 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

10ran
5unverified

Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from llm4softwaretesting/testeval. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

add_lineno llm4softwaretesting/testeval/data_utils.py official repository ran fingerprinted MIT (permissive) · f4e5ad618a9a9cbb · report
add_lineno_comment llm4softwaretesting/testeval/data_utils.py official repository ran MIT (permissive) · 65d02e229f9a78b7 · report
change_function_name llm4softwaretesting/testeval/format.py official repository ran fingerprinted MIT (permissive) · 337d5c7705c284c3 · report
execute llm4softwaretesting/testeval/eval_base.py official repository ran MIT (permissive) · 8671b30e9a445afa · report
execute llm4softwaretesting/testeval/eval_branchcov.py official repository ran MIT (permissive) · d95b2ac22f4237ce · report
generate_completion llm4softwaretesting/testeval/gen_linecov_cot_hf.py official repository ran MIT (permissive) · 092972ae0ca5e520 · report
match_path llm4softwaretesting/testeval/eval_pathcov.py official repository ran fingerprinted MIT (permissive) · 2d783fc0a836c6b1 · report
read_jsonl llm4softwaretesting/testeval/data_utils.py official repository ran MIT (permissive) · 60c584f55c9451fc · report
reformat_case_byrules llm4softwaretesting/testeval/format.py official repository ran fingerprinted MIT (permissive) · b4a15f613c2098bb · report
remove_extra llm4softwaretesting/testeval/format.py official repository ran fingerprinted MIT (permissive) · 4959d7997d3a14f1 · report
check_correctness llm4softwaretesting/testeval/eval_overall.py official repository unverified MIT (permissive) · 14f35d21477c79fd · report
coverage_at_k_sample llm4softwaretesting/testeval/eval_overall.py official repository unverified MIT (permissive) · db775593a397c583 · report
eval_correctness llm4softwaretesting/testeval/eval_linecov.py official repository unverified MIT (permissive) · b524c61a6f2dd835 · report
testgeneration_multiround llm4softwaretesting/testeval/generate_cov_gemini.py official repository unverified MIT (permissive) · ab6bc90d53359b17 · report
testgeneration_multiround llm4softwaretesting/testeval/generate_cov_hf.py official repository unverified MIT (permissive) · 75b3c705e3d449e4 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections