Can LLMs Generate Reliable Test Case Generators? A Study on Competition-Level Programming Problems
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have demonstrated remarkable capabilities in code generation, capable of tackling complex tasks during inference. However, the extent to which LLMs can be utilized for code checking or debugging through test case generation remains largely unexplored. We investigate this problem from the perspective of competition-level programming (CP) programs and propose TCGBench, a Benchmark for (LLM generation of) Test Case Generators. This benchmark comprises two tasks, aimed at studying the capabilities of LLMs in (1) generating valid test case generators for a given CP problem, and further (2) generating targeted test case generators that expose bugs in human-written code. Experimental results indicate that while state-of-the-art LLMs can generate valid test case generators in most cases, most LLMs struggle to generate targeted test cases that reveal flaws in human code effectively. Especially, even advanced reasoning models (e.g., o3-mini) fall significantly short of human performance in the task of generating targeted generators. Furthermore, we construct a high-quality, manually curated dataset of instructions for generating targeted generators. Analysis demonstrates that the performance of LLMs can be enhanced with the aid of this dataset, by both prompting and fine-tuning.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 10 of its 36 references that are in the map. First posted on arXiv 7 Jun 2025.
Builds on
10 of 36 references.
References · 10
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2023Structured Chain-of-Thought Prompting for Code Generationcited by 136
- 2025CodeElo: Benchmarking Competition-level Code Generation of LLMs with Human-comparable Elo Ratingscited by 109
- 2024Can Language Models Solve Olympiad Programming?cited by 70
- 2023SelfEvolve: A Code Evolution Framework via Large Language Modelscited by 43
Built on by
Citing papers per year: 2025: 3; 2026: 6.
9 papers.
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2025AutoCode: LLMs as Problem Setters for Competitive Programmingcited by 11
- 2026CodeHacker: Automated Test Case Generation for Detecting Vulnerabilities in Competitive Programming Solutionscited by 6
- 2025How Many Code and Test Cases Are Enough? Evaluating Test Cases Generation from a Binary-Matrix Perspectivecited by 4
- 2026VeriContest: A Competitive-Programming Benchmark for Verifiable Code Generationcited by 1
- 2026Beyond Problem Solving: UOJ-Bench for Evaluating Code Generation, Hacking, and Repair in Competitive Programmingcited by 1
- 2026X-Coder: Advancing Competitive Programming with Synthetic Tasks, Solutions, and Testscited by 0
- 2026Themis: Training Robust Multilingual Code Reward Models for Flexible Multi-Criteria Scoringcited by 0
- 2026Coding Agents as Test-Suite Auditors: Finding What Official Suites Miss While Approaching What They Catchcited by 0
- 2026Coding Agents as Test-Suite Auditors: Finding What Official Suites Miss While Approaching What They Catch3 Aug 2026
- 2026Beyond Problem Solving: UOJ-Bench for Evaluating Code Generation, Hacking, and Repair in Competitive Programming11 Jun 2026
- 2026VeriContest: A Competitive-Programming Benchmark for Verifiable Code Generation8 May 2026
- 2026Themis: Training Robust Multilingual Code Reward Models for Flexible Multi-Criteria Scoring1 May 2026
- 2026CodeHacker: Automated Test Case Generation for Detecting Vulnerabilities in Competitive Programming Solutions23 Feb 2026
- 2026X-Coder: Advancing Competitive Programming with Synthetic Tasks, Solutions, and Tests11 Jan 2026
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025How Many Code and Test Cases Are Enough? Evaluating Test Cases Generation from a Binary-Matrix Perspective9 Oct 2025
- 2025AutoCode: LLMs as Problem Setters for Competitive Programming29 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2024Large Language Models as Test Case Generators: Performance Evaluation and Enhancement
- 2026CodeContests-O: Powering LLMs via Feedback-Driven Iterative Test Case Generation
- 2025Rethinking Verification for LLM Code Generation: From Generation to Testing
- 2026LLMs taking shortcuts in test generation: A study with SAP HANA and LevelDB
- 2025CodeContests+: High-Quality Test Case Generation for Competitive Programming
- 2025HardTests: Synthesizing High-Quality Test Cases for LLM Coding
- 2025Evaluating and Improving Large Language Models for Competitive Program Generation
- 2025LLM4VV: Evaluating Cutting-Edge LLMs for Generation and Evaluation of Directive-Based Parallel Programming Model Compiler Tests ↗