mlsanityData to 7 Oct 2026

Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generation

arXiv 2602.08146 ↗First posted 8 Feb 2026cs.SEcited by 6

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

Software testing is a critical, yet resource-intensive phase of the software development lifecycle. Over the years, various automated tools have been developed to aid in this process. Search-based approaches typically achieve high coverage but produce tests with low readability, whereas large language model (LLM)-based methods generate more human-readable tests but often suffer from low coverage and compilability. While the majority of research efforts have focused on improving test coverage and readability, little attention has been paid to enhancing the robustness of bug detection, particularly in exposing corner cases and vulnerable execution paths. To address this gap, we propose AdverTest, a novel adversarial framework for LLM-powered test case generation. AdverTest comprises two interacting agents: a test case generation agent (T) and a mutant generation agent (M). These agents engage in an adversarial loop, where M persistently creates new mutants "hacking" the blind spots of T's current test suite, while T iteratively refines its test cases to "kill" the challenging mutants produced by M. This interaction loop is guided by both coverage and mutation scores, enabling the system to co-evolve toward both high test coverage and bug detection capability. Experimental results in the Defects4J dataset show that our approach improves fault detection rates by 8.56% over the best existing LLM-based methods and by 63.30% over EvoSuite, while also improving line and branch coverage.

Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 31 of its 73 references that are in the map. First posted on arXiv 8 Feb 2026.

Builds on

31 of 73 references.

Closest ancestors · 4

Same direction, newest first

  1. 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agents23 Jan
  2. 2025SWE-Debate: Competitive Multi-Agent Debate for Software Issue Resolution31 Jul
  3. 2025SWE-rebench: An Automated Pipeline for Task Collection and Decontaminated Evaluation of Software Engineering Agents26 May
  4. 2025TestForge: Feedback-Driven, Agentic Test Suite Generation18 Mar

Other references · 27

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
  4. 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
  5. 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 94
  6. 2024Automated Unit Test Improvement using Large Language Models at Metacited by 73
  7. 2025SWE-Exp: Experience-Driven Software Issue Resolutioncited by 64
  8. 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
  9. 2023Effective Test Generation Using Pre-trained Large Language Models and Mutation Testingcited by 51
  10. 2022Pynguin: Automated Unit Test Generation for Pythoncited by 49
  11. 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
  12. 2025LongCodeZip: Compress Long Context for Code Language Modelscited by 38
15 more
  1. 2023WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Modelscited by 37
  2. 2024HITS: High-coverage LLM-based Unit Test Generation via Method Slicingcited by 37
  3. 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
  4. 2023A3Test: Assertion-Augmented Automated Test Case Generationcited by 33
  5. 2023Learning Deep Semantics for Test Completioncited by 31
  6. 2023CAT-LM: Training Language Models on Aligned Code And Testscited by 28
  7. 2024Between Lines of Code: Unraveling the Distinct Patterns of Machine and Human Programmerscited by 27
  8. 2025Mutation-Guided LLM-based Test Generation at Metacited by 23
  9. 2026In Line with Context: Repository-Level Code Generation via Context Inliningcited by 18
  10. 2026GlimpRouter: Efficient Collaborative Inference by Glimpsing One Token of Thoughtscited by 16
  11. 2024Leveraging Large Language Models for Enhancing the Understandability of Generated Unit Testscited by 11
  12. 2024LLMs as Continuous Learners: Improving the Reproduction of Defective Code in Software Issuescited by 10
  13. 2021Extracting Concise Bug-Fixing Patches from Human-Written Patches in Version Control Systemscited by 9
  14. 2024A Comprehensive Study on Large Language Models for Mutation Testingcited by 3
  15. 2025Mutation Testing via Iterative Large Language Model-Driven Scientific Debuggingcited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 6.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026SWE-Mutation: Can LLMs Generate Reliable Test Suites in Software Engineering?
  2. 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows
  3. 2026Automated structural testing of LLM-based agents: methods, framework, and case studies
  4. 2026Complex Agents, Shallow Tests: Demystifying and Enhancing Test Adequacy of Agent Harness in the Wild
  5. 2025Challenges in Testing Large Language Model Based Software: A Faceted Taxonomy
  6. 2026ACE: Self-Evolving LLM Coding Framework via Adversarial Unit Test Generation and Preference Optimization
  7. 2025ImpossibleBench: Measuring LLMs' Propensity of Exploiting Test Cases
  8. 2025Rethinking Testing for LLM Applications: Characteristics, Challenges, and a Lightweight Interaction Protocol