SpecEngineeringBench: Evaluating Coding Agents as Autonomous Specification Engineers
Abstract
Autonomous specification engineering requires coding agents to translate functional requirements into executable tests and use the results to discover and validate defects. However, existing benchmarks evaluate coding agents on explicitly specified test generation tasks, commonly providing an issue description, a designated test entry point, or files to inspect, leaving the ability to determine what to test and where to investigate insufficiently evaluated. Relying on such clues bypasses the challenge of mapping requirements to implementations and proactively uncovering unknown defects. We propose SpecEngineeringBench, comprising 100 instances from 78 open-source Python repositories across 16 application categories, with multiple recorded defects in each instance. Two independent tasks evaluate complementary capabilities: generating test suites and discovering defects through execution analysis. The evaluation combines test validity, defect detection, and coverage with localization precision and recall. Across seven frontier coding agents, results reveal that test validity and coverage decouple from defect exposure: agents achieve a 91.47% Head Pass Rate and 80.48% Change-focused Coverage alongside a 26.36% Fail-to-Pass Rate, while localization recall drops from 78.11% at the file level to 51.29% at the function level. Autonomous test generation improves file, function, and hunk localization recall by 4.99, 2.77, and 2.69 percentage points over relying solely on existing repository test suites.
Community
We propose SpecEngineeringBench, a benchmark of 100 multi-defect instances across 78 Python repositories that evaluates coding agents on hint-free test generation and defect discovery. Evaluations of seven frontier agents show a stark disconnect between high test validity and coverage (91.47% pass rate, 80.48% coverage) and actual bug detection (26.36% fail-to-pass rate), alongside a drop in localization recall from 78.11% at the file level to 51.29% at the function level. Nevertheless, autonomous test generation still improves bug localization recall across files, functions, and hunks by 2.69 to 4.99 percentage points compared to relying solely on existing test suites.
Tests that pass 91.47% of the time and cover 80.48% of the changed code, but expose only 26.36% of the defects, is a result worth repeating. Coverage tells you the test walked through the room. It doesn't tell you the test looked at anything. I direct coding agents as a Language Modeler, and this matches what I see: asking for tests gets you tests, and asking what could be wrong gets you something different. Taking away the hints (no issue text, no entry point) is what makes the benchmark honest. Did the agents that exposed more defects write fewer, more targeted tests, or just more of them?
I like that this asks agents to decide what needs testing without a supplied location to inspect. For the defects that remain undetected, did you distinguish tests that reach the faulty behavior but lack a useful assertion from tests that never trigger it?
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- E2E-SWE: Benchmarking LLMs on Building Working Codebases from Scratch (2026)
- TestSuiteBench: Coding Agents Struggle to Generate Strong Test Suites from Specifications (2026)
- TestPrism: Rethinking Test Evaluation Beyond a Single Reference (2026)
- From Software History to Executable Regression Tasks: A System for Evaluating Software Agents (2026)
- WideSWE: Can Coding Agents Coordinate Changes Across Repositories? (2026)
- LoLBench: Evaluating Coding Agents with Long-Horizon Proposals on Large Software Systems (2026)
- SWE-Nexus: Automated Composition of Software Engineering Tasks from Test Execution (2026)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 1
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper