Less Is More: Failing Test Generation with Large Language Models

Failing test generation is challenging. It involves searching in a vast space for fault-triggering test inputs and the oracles asserting these faulty executions. Despite techniques proposed to generate tests using Large Language Models (LLMs) , they are ineffective in finding failing tests, particularly for programs that implement non-trivial coding tasks such as medium/advanced-level coding contest problems. To tackle this limitation, we are inspired by an earlier finding that constituent snippets within a program typically implement simpler coding tasks compared to the program as a whole. As a result, LLMs can be leveraged to generate failing tests that target a program’s constituent snippets, thereby revealing the program defects. Leveraging this insight, we propose Microscopic Test Generation (M it G en ) , a novel technique of failing test generation. Unlike previous approaches that generate tests to fulfill code coverage, MitGen focuses on generating tests that reveal faults in a given program’s constituent code snippets. We evaluate MitGen using Starcoder2-15B-instruct-v0.1 , Meta-Llama-3-8B-Instruct , and CodeQwen1.5-7B-Chat on two popular benchmarks ( EvoEval-Difficult and ClassEval ) and 100 real-world subjects. We compare MitGen with three baselines, including state-of-the-art approaches ( Differential Prompting and Pynguin ), in finding failing tests. The evaluation results show that MitGen ’s recall is 0.66, a 112.7% enhancement over the best baseline (0.31).

Link
https://doi.org/10.1145/3793675
Found by
Crossref
Authors
Tsz-On Li, Xiaochuan Yan, Wenxi Zong, Yibo Wang, Haoye Tian, Congying Xu, Ying Wang, Shing-Chi Cheung, Jeff Kramer
Organizations
The Hong Kong University of Science and Technology, Hong Kong, China and Guangzhou HKUST Fok Ying Tung Research Institute, Hong Kong, China, Northeastern University, Shenyang, China, Aalto University, Aalto, Finland, Imperial College London, London, United Kingdom of Great Britain and Northern Ireland
Categories
benchmark, evaluation
Published
2026-09-16
Last seen by the radar
2026-09-18
Citations
2
Radar score
39.48 / 100 (how it is scored)
Why it scored so
Matched: benchmark, evaluat; Primary record: Crossref
Is this record right? If you made this work and something here is wrong or missing, tell us what to fix.

More records found by Crossref