arrow_backBack to research feed
agentsPublished: July 2, 2026

TestEvo-Bench: An Executable and Live Benchmark for Test and Code Co-Evolution

By Jiale Amber Wang, Kaiyuan Wang, Pengyu Nie

Research TL;DR

"Introduces an executable, live benchmark for evaluating LLM agents on test-code co-evolution tasks, with up to 77.5% success on test generation but significant drop on recent tasks."

Abstract

Software tests and code evolve together: a code change should be followed by new or updated tests that record the new software behavior. Yet existing test generation and update benchmarks often isolate the test from the code change, and rely on static metadata that does not verify whether a test is executable or semantically tied to the code change. This makes it difficult to evaluate whether a test automation agent understands how a code change should propagate into the test suite. We introduce TestEvo-Bench, a benchmark of test and code co-evolution tasks mined from software repositories, with two tracks: in test generation, the agent shall write new tests to capture the new software behavior; in test update, the agent shall adapt failing existing tests to the changed software behavior. Each task is anchored to a real commit history and packaged with environment configuration to support execution-grounded metrics such as pass rate, coverage, and mutation score. TestEvo-Bench is also a live benchmark: each task records the timestamp of the test and code changes, and new tasks are periodically mined by our automated pipeline, so evaluation can be restricted to tasks postdating a model's training cutoff to reduce data leakage risk. The current snapshot contains 746 test generation and 509 test update tasks, curated from 59,950 candidate co-evolution records across 152 open-source Java projects. We experiment with four state-of-the-art agents that combine strong harnesses (Claude Code, Gemini CLI, and SWE-Agent) with strong foundation models (Claude Opus 4.7 and Gemini 3.1 Pro). Results show that they achieve up to 77.5% success rate on test generation and 74.6% on test update. However, success rate is materially lower on the most recent benchmark tasks and drops significantly under limited per-task cost.

Technical Analysis & Implementation

Overview§

TestEvo-Bench addresses the lack of grounded evaluation for test automation agents. It provides real-world test and code co-evolution tasks mined from git commits, with two tracks: test generation (writing new tests for new behavior) and test update (adapting failing tests to code changes). Each task includes a full executable environment, enabling metrics like pass rate, coverage, and mutation score. The benchmark is "live": tasks are timestamped and periodically added, allowing cutoff-based evaluation to reduce data leakage.

Task Construction§

From 59,950 candidate co-evolution records across 152 open-source Java projects, 746 test generation and 509 test update tasks were curated. Each task corresponds to a commit where both production code and test code changed. For test generation, the agent receives the code before and after the change and must write new tests; for test update, the agent gets the commit's diff and must fix failing tests.

Evaluation Metrics§

  • Pass rate: Fraction of tasks where all tests pass.
  • Coverage: Line/branch coverage of the changed code by generated/updated tests.
  • Mutation score: Fraction of killed mutants (injected faults) by the tests.
  • Cost: API call cost per task (limited to a budget).

Agents are scored overall as success rate (pass rate on all tasks).

Agents Evaluated§

Four state-of-the-art agent harnesses: Claude Code, Gemini CLI, SWE-Agent, each paired with strong foundation models (Claude Opus 4.7, Gemini 3.1 Pro). Agents have a budget per task (e.g., $5 for Gemini CLI, $10 for Claude Code).

Results§

  • Test generation: best agent achieves 77.5% success rate.
  • Test update: best agent achieves 74.6% success rate.
  • Performance drops by ~20% on the most recent tasks (post-2024), indicating potential data leakage.
  • Under limited budget (e.g., $1 per task), success rates plummet to ~30%.

Implementation Details§

Tasks are stored as Docker containers with all dependencies. The agent receives:

  • A prompt describing the code change (diff or before/after snapshots).
  • Access to the repository file system.
  • A test execution command.

The agent iteratively writes tests, runs them, and fixes errors until tests pass or budget exhausted.

Python Example: Loading and Running a Task§

import subprocess
import json

def run_task(task_dir: str, agent_script: str) -> dict:
    """Run a TestEvo-Bench task.
    
    Args:
        task_dir: Path to task directory with Dockerfile, code, and config.
        agent_script: Path to agent script that takes task_dir as argument.
    """
    config = json.load(open(f"{task_dir}/task.json"))
    print(f"Running {config['track']} task: {config['task_id']}")
    result = subprocess.run(
        ["docker", "run", "--rm", "-v", f"{task_dir}:/task", 
         "testevo-agent", "python", agent_script, "/task"],
        capture_output=True, text=True, timeout=600
    )
    return {
        "passed": result.returncode == 0,
        "output": result.stdout,
        "coverage": parse_coverage(result.stdout)
    }

def parse_coverage(output: str) -> float:
    # Extract JaCoCo coverage report
    import re
    match = re.search(r'Line coverage: ([0-9.]+)%', output)
    return float(match.group(1)) if match else 0.0

Key Equations§

Success rate ($S$) for a set of tasks $T$: $$ S = \frac{1}{|T|} \sum_{t \in T} \mathbb{I}[\text{test suite passes on task } t] $$

Mutation score ($M$): $$ M = \frac{\# \text{killed mutants}}{\# \text{total mutants}} $$

Coverage ($C$): $$ C = \frac{\text{lines covered by tests}}{\text{lines changed}} \times 100\% $$

Conclusion§

TestEvo-Bench provides a realistic, execution-grounded benchmark for test automation agents. Current agents show promise but struggle on recent data and under cost constraints, highlighting room for improvement.

Interactive SEO Tool

Interactive LLM Token & Cost Calculator

Estimate token usage and model pricing. Enter your prompt below to see how it is parsed into tokens and calculate the exact API cost for different providers.

Context Window202,752 tokens
Visual Tokenizer Chunks
Language models do not read text like humans. Instead, they process text in chunks called tokens. A token can be a single character, a syllable, a word, or even part of a word (like the "ing" in "walking"). On average, 1 token is equivalent to about 4 characters or 0.75 words of English text.
Estimated Token Count124

Cost Breakdown (USD)

Input Cost (Prompt):$0.000007
Output Cost (Generated):$0.000050
Total Est. Cost:$0.000057
Context Window Capacity0.0612%

API Pricing Comparison (per Million Tokens)

ModelInputOutput
GLM 4.7 Flash$0.06$0.40
o3 Pro$20.00$80.00
DeepSeek V3.1$0.21$0.79
Gemini 2.5 Pro Preview 06-05$1.25$10.00
GPT-5.2-Codex$1.75$14.00
Mistral Medium 3.1$0.40$2.00
Seed 1.6 Flash$0.07$0.30
MiniMax M1$0.40$2.20
Gemini 2.5 Flash$0.30$2.50
Seed 1.6$0.25$2.00
R1 0528$0.50$2.15
GPT-4o-mini$0.15$0.60
Qwen3 Coder Flash$0.20$0.97
Qwen3 Next 80B A3B Thinking$0.10$0.78
Qwen3 Next 80B A3B Instruct$0.09$1.10
Claude Sonnet 5$2.00$10.00
Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image)$0.25$1.50
Qwen Plus 0728 (thinking)$0.26$0.78
o4 Mini$1.10$4.40
GPT-4.1 Mini$0.40$1.60
o1$15.00$60.00
GPT-4o (2024-11-20)$2.50$10.00
Claude Sonnet 4.6$3.00$15.00
Mistral Large 2407$2.00$6.00
GLM 4.5V$0.60$1.80
Claude Opus 4.7 (Fast)$30.00$150.00
GPT-5 Chat$1.25$10.00
GPT-5 Nano$0.05$0.40
Qwen2.5 Coder 32B Instruct$0.66$1.00
gpt-oss-120b$0.03$0.15
Gemini 3.1 Flash Lite$0.25$1.50
GPT Chat Latest$5.00$30.00
Mistral Medium 3.5$1.50$7.50
Anthropic Claude Haiku Latest$1.00$5.00
GPT-5 Mini$0.25$2.00
MoonshotAI Kimi Latest$0.66$3.41
gpt-oss-20b$0.03$0.14
Claude Opus 4.1$15.00$75.00
Google Gemini Flash Latest$1.50$9.00
DeepSeek V3 0324$0.24$0.90
o1-pro$150.00$600.00
Mistral Small 3.1 24B$0.35$0.56
Qwen2.5 7B Instruct$0.04$0.10
Llama 3.2 3B Instruct$0.05$0.34
Anthropic Claude Sonnet Latest$2.00$10.00
Qwen3.5 Plus 2026-04-20$0.30$1.80
Qwen3.6 Flash$0.19$1.13
Qwen3.6 27B$0.28$2.40
GPT-5.5 Pro$30.00$180.00
Qwen2.5 72B Instruct$0.36$0.40
Command R (08-2024)$0.15$0.60
GPT-4o (2024-08-06)$2.50$10.00
Llama 3.1 8B Instruct$0.02$0.03
Mistral Nemo$0.02$0.03
GPT-4o-mini (2024-07-18)$0.15$0.60
Hy3 preview$0.06$0.21
GPT-5.4 Image 2$8.00$15.00
GPT-4o (2024-05-13)$5.00$15.00
Llama 3 8B Instruct$0.14$0.14
Mixtral 8x22B Instruct$2.00$6.00
Mistral Large$2.00$6.00
GPT-3.5 Turbo (older v0613)$1.00$2.00
GPT-4 Turbo Preview$10.00$30.00
Mistral Small 3$0.07$0.20
Claude Sonnet 4$3.00$15.00
MiniMax M2.7$0.18$0.72
GPT-5.4 Nano$0.20$1.25
GPT-5.4 Mini$0.75$4.50
Claude 3 Haiku$0.25$1.25
Qwen3 30B A3B Instruct 2507$0.05$0.19
GLM 4.5 Air$0.13$0.85
Command R+$2.50$10.00
Qwen3 Coder 480B A35B$0.22$1.80
UI-TARS 7B$0.10$0.20
Hunyuan A13B Instruct$0.14$0.57
ERNIE 4.5 VL 424B A47B$0.42$1.25
Claude Opus 4.8$5.00$25.00
GPT-5.5$5.00$30.00
o3 Mini$1.10$4.40
GPT-4o$2.50$10.00
Mistral Small 4$0.15$0.60
GLM 5 Turbo$1.20$4.00
Claude Opus 4.6$5.00$25.00
GPT-5$1.25$10.00
GPT-5.3-Codex$1.75$14.00
Gemini 3.1 Pro Preview$2.00$12.00
Claude Sonnet 4.5$3.00$15.00
Qwen3 30B A3B Thinking 2507$0.13$1.56
Mistral Small 3.2 24B$0.07$0.20
Qwen3.5 Plus 2026-02-15$0.26$1.56
Claude Opus 4.5$5.00$25.00
Claude Haiku 4.5$1.00$5.00
Claude Opus 4$15.00$75.00
Gemma 3n 4B$0.06$0.12
Gemini 2.5 Pro Preview 05-06$1.25$10.00
Llama Guard 4 12B$0.18$0.18
Qwen3 30B A3B$0.12$0.50
Qwen3 8B$0.12$0.46
Qwen3 14B$0.10$0.24
Qwen3 235B A22B$0.46$1.82
o4 Mini High$1.10$4.40
Step 3.5 Flash$0.10$0.30
Kimi K2.5$0.38$2.02
Gemini 2.5 Pro$1.25$10.00
o3$2.00$8.00
Llama 3.2 11B Vision$0.34$0.34
GPT-4.1$2.00$8.00
Gemini 3.1 Pro$2.00$12.00
Gemini 3.1 Flash$0.25$1.50
Llama 4 Maverick$0.15$0.60
Gemini 3.5 Flash$1.50$9.00
DeepSeek V3.2$0.23$0.34
Nano Banana Pro (Gemini 3 Pro Image Preview)$2.00$12.00
GPT-5.1$1.25$10.00
GPT-5 Image Mini$2.50$2.00
Llama 4 Scout$0.10$0.30
Llama 3.3 70B Instruct$0.10$0.32
Mistral Large 3$0.50$1.50
Command R$0.15$0.60
Grok 4.20$1.25$2.50
DeepSeek R1$0.70$2.50
Qwen Plus 0728$0.26$0.78
Qwen3 235B A22B Thinking 2507$0.15$1.50
Qwen 2.5-Coder 32B$0.35$0.70
Yi-Lightning$0.15$0.30
ERNIE 4.0$1.20$2.40
Doubao Pro$0.80$1.60
Gemini 2.0 Flash$0.10$0.40
Kimi K2 0711$0.57$2.30
Hunyuan Pro$0.60$1.20
Seed-2.0-Lite$0.25$2.00
GPT-5.1 Chat$1.25$10.00
GPT-5.1-Codex$1.25$10.00
Kimi K2 Thinking$0.60$2.50
Voxtral Small 24B 2507$0.10$0.30
gpt-oss-safeguard-20b$0.07$0.30
MiniMax M2$0.26$1.02
Qwen3 VL 32B Instruct$0.10$0.42
Qwen3 VL 8B Thinking$0.12$1.36
Qwen3 VL 8B Instruct$0.12$0.46
GPT-5 Image$10.00$10.00
o3 Deep Research$10.00$40.00
o4 Mini Deep Research$2.00$8.00
Nano Banana 2 (Gemini 3.1 Flash Image)$0.50$3.00
Nano Banana Pro (Gemini 3 Pro Image)$2.00$12.00
Kimi K2.7 Code$0.74$3.50
Claude Fable Latest$10.00$50.00
Claude Fable 5$10.00$50.00
Qwen3.7 Plus$0.32$1.28
MiniMax M3$0.30$1.20
Step 3.7 Flash$0.20$1.15
Claude Opus 4.8 (Fast)$10.00$50.00
Qwen3.7 Max$1.25$3.75
Grok Build 0.1$1.00$2.00
Mistral Medium 3$0.40$2.00
Grok 4.3$1.25$2.50
Google Gemini Pro Latest$2.00$12.00
Qwen3.6 35B A3B$0.14$1.00
Qwen3.6 Max Preview$1.04$6.24
DeepSeek V4 Pro$0.43$0.87
DeepSeek V4 Flash$0.09$0.18
Claude Opus Latest$5.00$25.00
Kimi K2.6$0.66$3.41
Claude Opus 4.7$5.00$25.00
GLM 5.1$0.97$3.04
Gemma 4 26B A4B$0.06$0.33
Gemma 4 31B$0.12$0.35
Qwen3.6 Plus$0.33$1.95
GLM 5V Turbo$1.20$4.00
Grok 4.20 Multi-Agent$1.25$2.50
Lyria 3 Pro Preview$0.00$0.00
GPT-4.1 Nano$0.10$0.40
Llama 4 Maverick$0.15$0.60
Nano Banana 2 (Gemini 3.1 Flash Image Preview)$0.50$3.00
Qwen 2.5 72B$0.40$0.80
Qwen3.5-35B-A3B$0.14$1.00
Qwen3.5-27B$0.20$1.56
Qwen3.5-122B-A10B$0.26$2.08
Qwen3.5-Flash$0.07$0.26
Gemini 3.1 Pro Preview Custom Tools$2.00$12.00
Qwen3.5 397B A17B$0.39$2.45
MiniMax M2.5$0.12$0.48
GLM 5$0.60$1.92
Qwen3 Max Thinking$0.78$3.90
Qwen3 Coder Next$0.11$0.80
MiniMax M2-her$0.30$1.20
GPT Audio$2.50$10.00
GPT Audio Mini$0.60$2.40
MiniMax M2.1$0.30$1.20
Mistral Large 2$0.60$1.80
Mixtral 8x22B$0.50$1.00
Llama 3.1 405B$0.80$0.80
Llama 3.1 8B$0.04$0.04
Qwen3.5-9B$0.10$0.15
GLM 4.7$0.40$1.75
Gemini 3 Flash Preview$0.50$3.00
GPT-5.2 Chat$1.75$14.00
GPT-5.2 Pro$21.00$168.00
Gemma 3 4B$0.05$0.10
Gemma 3 12B$0.05$0.15
Command A$2.50$10.00
GPT-4o-mini Search Preview$0.15$0.60
GPT-4o Search Preview$2.50$10.00
GPT-5.4 Pro$30.00$180.00
Claude 3.5 Sonnet v2$3.00$15.00
GPT-5.4$2.50$15.00
GPT-5.3 Chat$1.75$14.00
Gemini 3.1 Flash Lite Preview$0.25$1.50
Seed-2.0-Mini$0.10$0.40
Nano Banana (Gemini 2.5 Flash Image)$0.30$2.50
Qwen3 VL 30B A3B Thinking$0.13$1.56
Qwen3 VL 30B A3B Instruct$0.13$0.52
GPT-5 Pro$15.00$120.00
GLM 4.6$0.43$1.74
Qwen3 Max$0.78$3.90
Qwen3 Coder Plus$0.65$3.25
GLM 5.2$0.91$2.86
Grok 4.20$1.25$2.50
Lyria 3 Clip Preview$0.00$0.00
KAT-Coder-Pro V2$0.30$1.20
Codestral 2508$0.30$0.90
Qwen3 Coder 30B A3B Instruct$0.07$0.27
GLM 4.5$0.60$2.20
Gemini 2.5 Flash Lite$0.10$0.40
Qwen3 235B A22B Instruct 2507$0.09$0.10
GPT-5.2$1.75$14.00
Devstral 2 2512$0.40$2.00
GLM 4.6V$0.30$0.90
GPT-5.1-Codex-Max$1.25$10.00
Ministral 3 14B 2512$0.20$0.20
Ministral 3 8B 2512$0.15$0.15
Ministral 3 3B 2512$0.10$0.10
Mistral Large 3 2512$0.50$1.50
GPT-5 Codex$1.25$10.00
DeepSeek V3.1 Terminus$0.27$0.95
Qwen3 32B$0.08$0.28
GPT-5.1-Codex-Mini$0.25$2.00
Qwen-Plus$0.26$0.78
Llama 3.1 70B Instruct$0.40$0.40
Kimi K2 0905$0.60$2.50
DeepSeek V3.2 Exp$0.27$0.41
Gemini 2.5 Flash Lite Preview 09-2025$0.10$0.40
Qwen3 VL 235B A22B Thinking$0.26$2.60
Qwen3 VL 235B A22B Instruct$0.20$0.88
Qwen2.5 VL 72B Instruct$0.80$1.00
R1 Distill Llama 70B$0.80$0.80
R1$0.70$2.50
MiniMax-01$0.20$1.10
DeepSeek V3$0.20$0.80
Command R7B (12-2024)$0.04$0.15
Llama 3.3 70B Instruct$0.10$0.32
Gemma 2 27B$0.65$0.65
Gemma 3 27B$0.08$0.16
Saba$0.20$0.60
o3 Mini High$1.10$4.40
Llama 3.2 1B Instruct$0.03$0.20
Llama 3.2 11B Vision Instruct$0.34$0.34
GPT-4 Turbo$10.00$30.00
GPT-3.5 Turbo Instruct$1.50$2.00
GPT-3.5 Turbo 16k$3.00$4.00
GPT-4$30.00$60.00
GPT-3.5 Turbo$0.50$1.50
SHARE RESEARCH:
INTEGRATED RECOMMENDATION

Accelerate your workflow with Araho

Need help choosing the right model for your product? We build AI-native MVPs.

Get your MVP built in weeks with top-tier AI developers.