Manuscript Offprint

arXiv:2610.12289

TestPrism: Rethinking Test Evaluation Beyond a Single Reference

Han Li, Lingxiang Hu, Jiacheng Huang, Ziqian Jiang, Jingkai Luo, Wei Gao, Yunfan Tan, Zun Wang, Jiaheng Liu

Han Li1,∗^{1,*} Lingxiang Hu1,∗^{1,*} Jiacheng Huang1,∗^{1,*} Ziqian Jiang1^{1} Jingkai Luo1^{1} Wei Gao1^{1} Yunfan Tan2^{2} Zun Wang3^{3} Jiaheng Liu1,†^{1,\dagger}

1^{1} Nanjing University 2^{2} Hong Kong Polytechnic University 3^{3} Tencent

  • Equal contribution. †\dagger Corresponding author.

Large language model (LLM) coding agents have advanced test generation across diverse programming tasks. However, the common practice of evaluating tests against a single reference solution overlooks alternative valid implementations and can overstate test quality. We introduce TestPrism, comprising 300 test tasks from 17 sources and 3000 candidate implementations, evenly split between valid and invalid solutions. Its primary metric, Joint Success Function, requires the generated tests to fail on the initial program state, accept every valid candidate, and reject every invalid candidate. Across fourteen baseline coding agent configurations, Joint Success Function reaches only 28.00%, whereas single reference success reaches 59.67%. Our analysis reveals missed behaviors, unsupported assertions, and faulty test construction. To address these weaknesses, we introduce TestHelix, which combines heterogeneous synthesis of test and repair pairs with peer cross validation and recursive self improvement (RSI). Across two models, TestHelix improves Joint Success Function by 8.67 to 9.00 percentage points over the native harness comparators in the TestHelix evaluation.

Date: October 9, 2026

1 Introduction

Large language model (LLM) coding agents, such as Codex and Claude Code, can navigate repositories, modify implementations, and validate changes through execution feedback (Yang et al., 2024a; Wang et al., 2024; 2025b; Pan et al., 2026; Li et al., 2026b). These capabilities also support automated test generation and improvement (Chen et al., 2024; Alshahwan et al., 2024). Reliable tests must generalize across valid implementations while remaining sensitive to specification violations (Zhu et al., 1997; Barr et al., 2015).

Limitations of Existing Benchmarks. Test generation benchmarks span function level tasks, as in TestEval (Wang et al., 2025a), and repository issues, as in SWT Bench (Mündler et al., 2025). A common success criterion remains single reference evaluation: a suite must fail on the initial program and pass on one gold solution (Mündler et al., 2025; Ahmed et al., 2024). Yet a requirement can admit multiple valid implementations and plausible incorrect ones. A test can pass this check while missing required behavior (Qi et al., 2015; Liu et al., 2023) or imposing unnecessary implementation constraints. We therefore ask: How robust is the evaluation of generated tests to variation across implementations? Table 1 compares existing benchmarks; counting conventions and target mappings appear in Appendix A.

TestPrism: Beyond Single Reference Evaluation. TestPrism contains 300 test tasks from 17 sources across six programming languages, covering repository maintenance, algorithmic programming, and performance optimization. We adapt executable tasks to a shared interface, enrich their candidate patch sets, verify and select diverse implementations, and convert the tasks for test generation. For each test task, we retain the reference and select four valid alternatives and five invalid implementations through

1 / 36

TestPrism: Rethinking Test Evaluation Beyond a Single Reference

Table 1. Scope and evaluation targets of test generation benchmarks.

BenchmarkTasksVariantsLanguagesRARVARIRRJSFΔCECScope
Block, File, and Multifile Benchmarks
TestGenEval1,210✓1✕✕+✕✕✕File
CLOVER845✕1✕✕✕✕✕✕Block/file
MultiFileTest60✕3✕✕✕✕✕✕Multifile
Repository Benchmarks
SWT Bench1,983✕1✓✕✕✕+✕Repo.
TDD Bench Verified449✕1✓✕✕✕+✕Repo.
OmniCode3961,1093✕✕+✕✕✕Repo.
SWE Mutation8002,63610✓✕+✕✕✕Repo.
TestPrism (Ours)3002,7006✓✓✓✓✓✓Block/fileMultifileRepo.

explicit diversity checks. Building on this pipeline, we construct TestPrism with 2,000 tasks from 17 source benchmarks, partitioned into 1,700 training tasks and 300 test tasks. The test set contains 3000 candidate implementations and spans six task categories and 34 subcategories across 67 repositories and projects. This task diversity supports assessing how well coding agents generalize test generation across programming scenarios. The disjoint training set supports adapting test generation strategies in TestHelix's recursive self improvement (RSI) stage.

Our evaluation protocol executes each submitted suite on the initial state and every candidate. Its primary metric, Joint Success Function, requires initial failure and agreement with every candidate label. Restricting the panel to the reference recovers single reference evaluation as a minimal approximation. Complementary acceptance, rejection, and coverage metrics locate behavioral disagreements and the code exercised by the tests.

TestHelix. We introduce TestHelix to address these weaknesses through heterogeneous synthesis of test and repair pairs. Its inner workflow establishes consistency within each pair, then uses peer cross validation, comprising cross execution, semantic review, and corrective feedback, to check and correct tests across pairs. Its outer RSI loop proposes test generation strategies on training tasks and validates one frozen challenger on a disjoint set before benchmark evaluation.

Takeaways. We evaluate fourteen coding agent configurations spanning six model families. Our analysis reveals four key findings: ① Reliable test generation remains far from solved by frontier models. The strongest baseline reaches only 28.00% Joint Success Function, compared with 59.67% single reference success (Table 2). Coverage tracks success: change and entry coverage correlate with Joint Success Function across configurations (r = 0.91 and 0.96). ② Joint Success Function is a dynamic measure of reliability across implementations. Larger candidate panels impose additional behavioral requirements, as shown in Figure 3. Single reference evaluation is its weakest special case and an upper bound on expanded panel success. ③ Failures span coverage gaps, faulty checks, and execution logic errors. We sample 300 failed trajectories, 50 from the highest Joint Success Function configuration in each of six model families, and analyze 286 after excluding 14 timeout trajectories. The category shares among the analyzed trajectories are 34.6%, 50.0%, and 15.4%, respectively (Figure 4), explaining limited reliability through omissions, misjudgments, and execution failures. Missing inputs and weak assertions can pass single reference evaluation while accepting invalid patches. ④ Heterogeneous synthesis helps tests generalize across implementations. With peer cross validation using diverse repairs to check and correct tests and RSI adapting test generation strategies across tasks, TestHelix raises Joint Success Function over Single by 11.67 to 12.00 percentage points under matched inference budget caps (Table 3).

Contributions. Our work makes three contributions:

2 / 36

TestPrism: Rethinking Test Evaluation Beyond a Single Reference

  • We construct TestPrism, with 1,700 training tasks and 300 test tasks from 17 sources, providing 3000 labeled implementations for evaluation. Its Joint Success Function criterion extends single reference evaluation to assess whether generated tests accept valid alternatives and reject incorrect implementations.

  • We evaluate fourteen coding agent configurations across six model families and develop an error taxonomy from 286 retained failed trajectories spanning their highest Joint Success Function configurations. These complementary analyses characterize current agent performance and identify specific mistakes that cause generated tests to miss invalid behavior or reject valid alternatives, including failures hidden by single reference evaluation.

  • We introduce TestHelix, which combines heterogeneous synthesis with peer cross validation and RSI. It checks and corrects tests through cross execution and semantic review, and adapts reusable test generation strategies to improve reliability across implementations under matched inference budget caps.

References (58)