The mabl blog: Agentic Software Testing

Testing Harness vs. Coding Harness: Why It Matters | mabl

Written by Lauren Leidal | Oct 27, 2026, 7:58:32 PM

Anthropic’s AI-Native SDLC Playbook provides a detailed blueprint for the environment where coding agents run. It builds validation directly into the loop, attempting to ensure every session checks its work before a human reviews it. But a recent Stanford study revealed a massive caveat: the exact same AI model performs 6x better when placed inside a dedicated verification harness instead of a coding harness.

As we often say about independent verification, the author of a change cannot be its verifier. An agent that wrote the code is actively rewarded for finishing it. That makes it the absolute worst candidate to decide if the code is safe to ship.

This post breaks down the testing harness that makes independent verification possible. We will look at the environment a single testing agent requires, and the platform needed to run these agents across an enterprise.

The limits of the coding harness

You might argue that the Anthropic playbook already handles bias by spinning up a verifier subagent in a fresh context. The catch is that this subagent still grades the work against the coding agent's own plan. The playbook’s evaluations test the agent's configuration rather than the actual application. These checks ensure the agent follows instructions, but they fail to confirm if the product actually works for a user.

The playbook also prevents the coding agent from approving its own pull request. That separates authorship from approval, but it skips verification. The human pressing approve still relies entirely on evidence generated by the coding harness.

True independent verification requires completely separate infrastructure, memory, and incentives.

What makes a testing agent different

Every agent operates within a harness that defines its rewards, context, toolset, memory, and fallback behaviors. You can run a coding agent and a testing agent on the identical underlying model. The harness itself determines why the testing agent catches the critical failures the coding agent glosses over.

Incentives and rewards

A coding agent wants to cross the finish line. The playbook’s verification block tells the agent to run the build, run the tests, fix any failures, and report success. Because its goal is completion, it interprets ambiguity favorably. To a coding agent trying to close a ticket, a three-second lag on the payment screen is acceptable.

A testing agent exists to find failures before your users do. It actively flags that three-second lag, captures the evidence, and hands it to a human to decide if it matters. The playbook acknowledges this inherent incentive flaw by recommending a hook that blocks coding agents from editing test files. A proper testing harness builds around this adversarial assumption from day one.

Context and worldview

Coding agents rely on repository files for commands, architecture, and team conventions. Verifying an application requires a totally different worldview. A testing harness needs deep quality context:

  • Behavioral models: An understanding of user workflows, states, and rules learned from real production runs.

  • External updates: Mechanisms to update its understanding from live telemetry and test runs to spot silent behavioral drift.

  • Out-of-repo knowledge: Context on third-party APIs, single sign-on (SSO) providers, and downstream services that change without a visible commit.

  • Explicit QA standards: The unwritten rules translated into explicit directives, such as exact-match assertions for legal compliance.

  • Precision retrieval: Giving the agent exactly the context it needs for the specific flow.

When a third-party checkout service changes its behavior without a deployment on your end, your testing harness needs a way to find out.

The authoring approach

A coding agent writes tests to prove its code works. Following the playbook, it writes a failing test, confirms the failure, and writes code until it passes. These tests only validate what the agent already believes is true.

A testing agent starts with the business objective and hunts for ways a workflow might break. This requires navigating multi-factor authentication, authenticated API calls, database validations, PDF parsing, and fuzzy assertions on AI-generated text. It ensures a test actually asserts what the business cares about.

Tools and perception

A coding agent lives in the terminal and version control. A testing agent perceives the application exactly as a user does through real browsers, mobile devices, email inboxes, and database access.

Capture is its primary tool. At every step, the testing agent grabs a screenshot, the Document Object Model (DOM), the network log, and console output. That is what it reasons over to spot anomalies.

Memory and historical context

A coding agent’s memory resets after the pull request. A testing agent needs the complete historical context of the test it runs. It needs to know that step four usually takes 800 milliseconds, or that an assertion also failed last Tuesday in this exact environment. A slow page load means something very different if that page has been fast for a year versus historically sluggish.

Judging and healing

When a testing agent sees a failed test, it must diagnose the root cause. It determines if the product broke, the test broke, the staging environment went down, or the test data went stale. Each answer requires a different response.

Self-healing needs strict discipline. A harness should use standard fallback locators before escalating to reasoning models, saving your token budget. It must write durable fixes back to the test suite. Most importantly, self-healing must never hide a legitimate product defect. Earning unmerited confidence ruins a testing harness.

Keeping the harness honest

A new model upgrade might benchmark better overall but fail completely on your specific legacy workflows. Your harness needs a baseline evaluation set of known failures that runs on every model upgrade, backed by automated transcript reviews.

This is Part 1 of a 2-part series.