Unit Test Case Generation with Transformers and Focal Context
Not on the map. Why?
Cited by 21 in LLM agents and tool use, but placed by its own abstract, which didn’t fit.
Abstract (arXiv)
Automated unit test case generation tools facilitate test-driven development and support developers by suggesting tests intended to identify flaws in their code. Existing approaches are usually guided by the test coverage criteria, generating synthetic test cases that are often difficult for developers to read or understand. In this paper we propose AthenaTest, an approach that aims to generate unit test cases by learning from real-world focal methods and developer-written testcases. We formulate unit test case generation as a sequence-to-sequence learning task, adopting a two-step training procedure consisting of denoising pretraining on a large unsupervised Java corpus, and supervised finetuning for a downstream translation task of generating unit tests. We investigate the impact of natural language and source code pretraining, as well as the focal context information surrounding the focal method. Both techniques provide improvements in terms of validation loss, with pretraining yielding 25% relative improvement and focal context providing additional 11.1% improvement. We also introduce Methods2Test, the largest publicly available supervised parallel corpus of unit test case methods and corresponding focal methods in Java, which comprises 780K test cases mined from 91K open-source repositories from GitHub. We evaluate AthenaTest on five defects4j projects, generating 25K passing test cases covering 43.7% of the focal methods with only 30 attempts. We execute the test cases, collect test coverage information, and compare them with test cases generated by EvoSuite and GPT-3, finding that our approach outperforms GPT-3 and has comparable coverage w.r.t. EvoSuite. Finally, we survey professional developers on their preference in terms of readability, understandability, and testing effectiveness of the generated tests, showing overwhelmingly preference towards AthenaTest.
Key facts. Cited by 118 papers in the map (data through 7 Oct 2026). First posted on arXiv 11 Sep 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 5; 2022: 8; 2023: 24; 2024: 31; 2025: 28; 2026: 22.
118 papers.
Sort:
By area:
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2023LEVER: Learning to Verify Language-to-Code Generation with Executioncited by 228
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
- 2023Planning with Large Language Models for Code Generationcited by 179
- 2023SantaCoder: don't reach for the stars!cited by 169
- 2022MultiPL-E: A Scalable and Extensible Approach to Benchmarking Neural Code Generationcited by 132
- 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agentscited by 129
- 2023Learning Performance-Improving Code Editscited by 103
38 more
- 2022Execution-Based Evaluation for Open-Domain Code Generationcited by 89
- 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Futurecited by 85
- 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 53
- 2024The Limits of Inference Scaling Through Resamplingcited by 51
- 2025Co-Evolving LLM Coder and Unit Tester via Reinforcement Learningcited by 51
- 2022Interactive Code Generation via Test-Driven User-Intent Formalizationcited by 50
- 2022Investigating Explainability of Generative AI for Code through Scenario-based Designcited by 47
- 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
- 2024TDD-Bench Verified: Can LLMs Generate Tests for Issues Before They Get Resolved?cited by 32
- 2023Learning Deep Semantics for Test Completioncited by 31
- 2023CAT-LM: Training Language Models on Aligned Code And Testscited by 28
- 2024Large Language Models as Test Case Generators: Performance Evaluation and Enhancementcited by 27
- 2024HumanEvalComm: Benchmarking the Communication Competence of Code Generation for LLMs and LLM Agentcited by 24
- 2024CodeBenchGen: Creating Scalable Execution-based Code Generation Benchmarkscited by 23
- 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 21
- 2024CodePori: Large-Scale System for Autonomous Software Development Using Multi-Agent Technologycited by 21
- 2024Can Large Language Models Serve as Data Analysts? A Multi-Agent Assisted Approach for Qualitative Data Analysiscited by 20
- 2023Augmenting Greybox Fuzzing with Generative AIcited by 18
- 2023LLM4VV: Developing LLM-Driven Testsuite for Compiler Validationcited by 15
- 2023RAPGen: An Approach for Fixing Code Inefficiencies in Zero-Shotcited by 14
- 2024Rocks Coding, Not Development--A Human-Centric, Experimental Evaluation of LLM-Supported SE Taskscited by 13
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2023The Program Testing Ability of Large Language Models for Codecited by 11
- 2024Leveraging Large Language Models for Preliminary Security Risk Analysis: A Mission-Critical Case Studycited by 10
- 2024B4: Towards Optimal Assessment of Plausible Code Solutions with Plausible Testscited by 9
- 2024Measuring the Influence of Incorrect Code on Test Generationcited by 9
- 2025LLM Test Generation via Iterative Hybrid Program Analysiscited by 9
- 2023Automating Code-Related Tasks Through Transformers: The Impact of Pre-trainingcited by 8
- 2024CATCODER: Repository-Level Code Generation with Relevant Code and Type Contextcited by 8
- 2024PLUM: Improving Code LMs with Execution-Guided On-Policy Preference Learning Driven By Synthetic Test Casescited by 8
- 2024A System for Automated Unit Test Generation Using Large Language Models and Assessment of Generated Test Suitescited by 8
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 8
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2025SemAgent: A Semantics Aware Program Repair Agentcited by 8
50 most cited of 118 All 118 (JSON)
- 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generation17 Aug 2026
- 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregation6 Aug 2026
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026Do Coverage and Mutation Scores of LLM-Generated Test Suites Correlate with Their Effectiveness? (Replicability Study)24 Jul 2026
- 2026Quantize with Confidence? An Empirical Study of Quantization for Code Generation15 Jul 2026
- 2026ReProAgent: Tool-Augmented Multi-Stage Agentic Generation of Bug Reproduction Tests from Issue Reports10 Jul 2026
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows10 Jul 2026
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generation9 Jul 2026
- 2026Teaching Code LLMs to Reason with Intermediate Formal Specifications5 Jul 2026
- 2026Leveraging Large Language Models to Obscure Code Stylometry: A Comparative Study of GPT-3.5 and GPT-421 Jun 2026
- 2026AINTMA: Agentic AI Architecture for Autonomous Test Management with Generative Intelligence, Secure Cloud Communication and Adaptive Quality Analytics14 May 2026
- 2026FeedbackLLM: Metadata driven Multi-Agentic Language Agnostic Test Case Generator with Evolving prompt and Coverage Feedback2 May 2026
38 more
- 2026PPO guided Agentic Pipeline for Adaptive Prompt Selection and Test Case Generation1 May 2026
- 2026Program Structure-aware Language Models: Targeted Software Testing beyond Textual Semantics20 Apr 2026
- 2026Enhancing LLM-Based Test Generation by Eliminating Covered Code25 Feb 2026
- 2026SpecMind: Cognitively Inspired, Interactive Multi-Turn Framework for Postcondition Inference24 Feb 2026
- 2026Compiling Large Multi-Modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspective14 Feb 2026
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generation8 Feb 2026
- 2026Synthesizing File-Level Data for Unit Test Generation with Chain-of-Thoughts via Self-Debugging3 Feb 2026
- 2026AICD Bench: A Challenging Benchmark for AI-Generated Code Detection2 Feb 2026
- 2026RM -RF: Reward Model for Run-Free Unit Test Evaluation19 Jan 2026
- 2026Explicating Tacit Regulatory Knowledge from LLMs to Auto-Formalize Requirements for Compliance Test Case Generation14 Jan 2026
- 2025LLMs for Automated Unit Test Generation and Assessment in Java: The AgoneTest Framework25 Nov 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025Assertion-Aware Test Code Summarization with Large Language Models9 Nov 2025
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesis30 Oct 2025
- 2025UniCode: Augmenting Evaluation for Code Reasoning16 Oct 2025
- 2025Beyond Postconditions: Can Large Language Models infer Formal Contracts for Automatic Software Verification?14 Oct 2025
- 2025Clarifying Semantics of In-Context Examples for Unit Test Generation2 Oct 2025
- 2025Large Language Models for Software Testing: A Research Roadmap29 Sep 2025
- 2025DiffuTester: Accelerating Unit Test Generation for Diffusion LLMs via Mining Structural Pattern29 Sep 2025
- 2025Navigating the Labyrinth: Path-Sensitive Unit Test Generation with Large Language Models28 Sep 2025
- 2025DeepGo: Predictive Directed Greybox Fuzzing29 Jul 2025
- 2025MERA Code: A Unified Framework for Evaluating Code Generation Across Tasks16 Jul 2025
- 2025Re-Evaluating Code LLM Benchmarks Under Semantic Mutation20 Jun 2025
- 2025SemAgent: A Semantics Aware Program Repair Agent19 Jun 2025
- 2025Leveraging GPT-4 for Vulnerability-Witnessing Unit Test Generation13 Jun 2025
- 2025Co-Evolving LLM Coder and Unit Tester via Reinforcement Learning3 Jun 2025
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation3 Jun 2025
- 2025A Tool for Generating Exceptional Behavior Tests With Large Language Models28 May 2025
- 2025Advancing AI-Scientist Understanding: Multi-Agent LLMs with Interpretable Physics Reasoning2 Apr 2025
- 2025Codehacks: A Dataset of Adversarial Tests for Competitive Programming Problems Obtained from Codeforces30 Mar 2025
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generation18 Mar 2025
- 2025LLM Test Generation via Iterative Hybrid Program Analysis17 Mar 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2025Static Program Analysis Guided LLM Based Unit Test Generation7 Mar 2025
- 2025CLOVER: A Test Case Generation Benchmark with Coverage, Long-Context, and Verification12 Feb 2025
- 2025A Systematic Approach for Assessing Large Language Models' Test Case Generation Capability5 Feb 2025
- 2025Evaluating LLM-Based Regression Test Generation19 Jan 2025
- 2025LlamaRestTest: Effective REST API Testing with Small Language Models15 Jan 2025
50 newest of 118 All 118 (JSON)
- 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agentscited by 129
- 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Futurecited by 85
- 2024HumanEvalComm: Benchmarking the Communication Competence of Code Generation for LLMs and LLM Agentcited by 24
- 2024CodePori: Large-Scale System for Autonomous Software Development Using Multi-Agent Technologycited by 21
- 2024Can Large Language Models Serve as Data Analysts? A Multi-Agent Assisted Approach for Qualitative Data Analysiscited by 20
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 8
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2025SemAgent: A Semantics Aware Program Repair Agentcited by 8
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generationcited by 6
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
- 2026Compiling Large Multi-Modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspectivecited by 1
12 most cited of 20 All 20 (JSON)
- 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generation17 Aug 2026
- 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregation6 Aug 2026
- 2026ReProAgent: Tool-Augmented Multi-Stage Agentic Generation of Bug Reproduction Tests from Issue Reports10 Jul 2026
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows10 Jul 2026
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generation9 Jul 2026
- 2026AINTMA: Agentic AI Architecture for Autonomous Test Management with Generative Intelligence, Secure Cloud Communication and Adaptive Quality Analytics14 May 2026
- 2026FeedbackLLM: Metadata driven Multi-Agentic Language Agnostic Test Case Generator with Evolving prompt and Coverage Feedback2 May 2026
- 2026PPO guided Agentic Pipeline for Adaptive Prompt Selection and Test Case Generation1 May 2026
- 2026Compiling Large Multi-Modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspective14 Feb 2026
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generation8 Feb 2026
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesis30 Oct 2025
12 newest of 20 All 20 (JSON)
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023LEVER: Learning to Verify Language-to-Code Generation with Executioncited by 228
- 2025Advancing AI-Scientist Understanding: Multi-Agent LLMs with Interpretable Physics Reasoningcited by 4
- 2025UniCode: Augmenting Evaluation for Code Reasoningcited by 1
- 2026Teaching Code LLMs to Reason with Intermediate Formal Specificationscited by 1
- 2026Synthesizing File-Level Data for Unit Test Generation with Chain-of-Thoughts via Self-Debuggingcited by 0
- 2026Teaching Code LLMs to Reason with Intermediate Formal Specifications5 Jul 2026
- 2026Synthesizing File-Level Data for Unit Test Generation with Chain-of-Thoughts via Self-Debugging3 Feb 2026
- 2025UniCode: Augmenting Evaluation for Code Reasoning16 Oct 2025
- 2025Advancing AI-Scientist Understanding: Multi-Agent LLMs with Interpretable Physics Reasoning2 Apr 2025
- 2023Code Llama: Open Foundation Models for Code24 Aug 2023
- 2023LEVER: Learning to Verify Language-to-Code Generation with Execution16 Feb 2023
- 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 21
- 2024PLUM: Improving Code LMs with Execution-Guided On-Policy Preference Learning Driven By Synthetic Test Casescited by 8
- 2024Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 0
- 2024Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generation18 Dec 2024
- 2024PLUM: Improving Code LMs with Execution-Guided On-Policy Preference Learning Driven By Synthetic Test Cases11 Jun 2024
- 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generation3 Oct 2023
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
- 2023Planning with Large Language Models for Code Generationcited by 179
- 2023SantaCoder: don't reach for the stars!cited by 169
- 2022MultiPL-E: A Scalable and Extensible Approach to Benchmarking Neural Code Generationcited by 132
- 2023Learning Performance-Improving Code Editscited by 103
- 2022Execution-Based Evaluation for Open-Domain Code Generationcited by 89
- 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
12 most cited of 88 All 88 (JSON)
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026Do Coverage and Mutation Scores of LLM-Generated Test Suites Correlate with Their Effectiveness? (Replicability Study)24 Jul 2026
- 2026Quantize with Confidence? An Empirical Study of Quantization for Code Generation15 Jul 2026
- 2026Leveraging Large Language Models to Obscure Code Stylometry: A Comparative Study of GPT-3.5 and GPT-421 Jun 2026
- 2026Program Structure-aware Language Models: Targeted Software Testing beyond Textual Semantics20 Apr 2026
- 2026Enhancing LLM-Based Test Generation by Eliminating Covered Code25 Feb 2026
- 2026SpecMind: Cognitively Inspired, Interactive Multi-Turn Framework for Postcondition Inference24 Feb 2026
- 2026AICD Bench: A Challenging Benchmark for AI-Generated Code Detection2 Feb 2026
- 2026RM -RF: Reward Model for Run-Free Unit Test Evaluation19 Jan 2026
- 2026Explicating Tacit Regulatory Knowledge from LLMs to Auto-Formalize Requirements for Compliance Test Case Generation14 Jan 2026
- 2025LLMs for Automated Unit Test Generation and Assessment in Java: The AgoneTest Framework25 Nov 2025
- 2025Assertion-Aware Test Code Summarization with Large Language Models9 Nov 2025
12 newest of 88 All 88 (JSON)