mlsanityData to 7 Oct 2026

HarnessLLM: Automatic Testing Harness Generation via Reinforcement Learning

arXiv 2511.01104 ↗First posted 2 Nov 2025cs.SE cs.CLcited by 2

Not on the map. Why?

Abstract (arXiv)

Existing LLM-based automatic test generation methods mainly produce input and expected output pairs to categorize the intended behavior of correct programs. Although straightforward, these methods have limited diversity in generated tests and cannot provide enough debugging information. We propose HarnessLLM, a two-stage training pipeline that enables LLMs to write harness code for testing. Particularly, LLMs generate code that synthesizes inputs and validates the observed outputs, allowing complex test cases and flexible output validation such as invariant checking. To achieve this, we train LLMs with SFT followed by RLVR with a customized reward design. Experiments show that HarnessLLM outperforms input-output-based testing in bug finding and testing strategy diversity. HarnessLLM further benefits the code generation performance through test-time scaling with our generated test cases as inference-phase validation. Our code is available at https://github.com/UCSB-NLP-Chang/HarnessLLM.git.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 28 of its 42 references that are in the map. First posted on arXiv 2 Nov 2025.

Builds on

28 of 42 references.

References · 28

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
  3. 2021Program Synthesis with Large Language Modelscited by 3,509
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  5. 2024HybridFlow: A Flexible and Efficient RLHF Frameworkcited by 1,980
  6. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  7. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  8. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  9. 2023Teaching Large Language Models to Self-Debugcited by 963
  10. 2021Measuring Coding Challenge Competence With APPScited by 879
  11. 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
  12. 2025ThinkPrune: Pruning Long Chain-of-Thought of LLMs via Reinforcement Learningcited by 187
16 more
  1. 2025Competitive Programming with Large Reasoning Modelscited by 115
  2. 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
  3. 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 94
  4. 2025ACECODER: Acing Coder RL via Automated Test-Case Synthesiscited by 89
  5. 2023No More Manual Tests? Evaluating and Improving ChatGPT for Unit Test Generationcited by 82
  6. 2025LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMscited by 67
  7. 2025Co-Evolving LLM Coder and Unit Tester via Reinforcement Learningcited by 51
  8. 2023ALGO: Synthesizing Algorithmic Programs with LLM-Generated Oracle Verifierscited by 41
  9. 2025CodeContests+: High-Quality Test Case Generation for Competitive Programmingcited by 39
  10. 2025Learning to Solve and Verify: A Self-Play Framework for Code and Test Generationcited by 34
  11. 2023Accelerating Reinforcement Learning of Robotic Manipulations via Feedback from Large Language Modelscited by 22
  12. 2025PatchPilot: A Cost-Efficient Software Engineering Agent with Early Attempts on Formal Verificationcited by 22
  13. 2023The Program Testing Ability of Large Language Models for Codecited by 11
  14. 2024ArchCode: Incorporating Software Requirements in Code Generation with Large Language Modelscited by 8
  15. 2025Can Language Models Falsify? Evaluating Algorithmic Reasoning with Counterexample Creationcited by 5
  16. 2025Collision- and Reachability-Aware Multi-Robot Control with Grounded LLM Plannerscited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generation
  2. 2026Complex Agents, Shallow Tests: Demystifying and Enhancing Test Adequacy of Agent Harness in the Wild
  3. 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generation
  4. 2025Rethinking Verification for LLM Code Generation: From Generation to Testing
  5. 2026TTHE: Test-Time Harness Evolution
  6. 2026GRPO with State Mutations: Improving LLM-Based Hardware Test Plan Generation
  7. 2026MIST-RL: Mutation-based Incremental Suite Testing via Reinforcement Learning
  8. 2025TestForge: Feedback-Driven, Agentic Test Suite Generation