Take a merge request of 1,200 lines with 38 tests attached. The CSV export, the VAT rounding: everything looks covered, and the suite goes green in forty seconds. The review takes twenty minutes, two people approve, the button gets clicked. Nobody on the team could say what those 38 tests prevent from breaking.
What a green test certifies
A post by Martin Fowler, published in November 2026, describes the problem: when AI agents write both the production code and the tests, developers lose the assurance that automated tests protect against functional errors [1].
A green test says that an assertion passed on a given input. Coverage counts the lines that input went through. Someone wrote the assertion; if that someone has the code in front of them, it is easy to describe what the program actually does instead of the expectation stated in the ticket. The test becomes a mirror of the code. A mirror never breaks.
Confidence in an automated suite comes from a gap that is maintained, between an expectation written without knowing the implementation and code that bends to it. A test written after reading the code can no longer fail on a misunderstanding, because it describes what the program already does.
Write the expected cases in a table, outside the code
The first move happens in a file the agent reads and does not write. One page, three columns: the input, the expected output, the business rule in plain words. One case per line, set down before the first line of code.
Take a team of five picking up a billing calculation. The table has fifteen lines, one on VAT rounding and two on cascading discounts. The product manager writes the lines, the developer reviews them, the agent receives the table as input. On the first run, four lines break: the rounding calculation does not match what the table asks for. The fix happens in the table, before the production code is written.
The format matters little: YAML, CSV, a Markdown table in the repository. What matters is the place. Next to the code, versioned, reviewed in a diff, editable by a person who does not read the production code. When the table grows, a round of Planning Poker on the lines says which ones to write first.
Generate the tests without showing the code
Two agent sessions, two scopes. The first receives the case table and the business rules, never the code. The second writes the implementation. Run both, look at what breaks.
A session that has not seen the code writes assertions on values derived from the specification, which produces the independent expectation that was missing.
The procedure does not scale everywhere. It costs one more session, and above all two files to keep in sync: the case table and the generated tests. Across a whole backlog, drift comes fast, with a case fixed in the table staying wrong in the test that claims to cover it. So the table remains the single source; test files are regenerated from it rather than edited by hand; and a diff that touches a test without touching the table is reviewed as a specification change, with the person who wrote the rule.
Reserve the setup for critical business rules: VAT rounding, an eligibility threshold. On a form screen or a label change, the separate session costs more than it returns.
The gap between the two sessions sometimes pays off in useful disagreements: the testing session discovers that a rule in the table allows two possible interpretations, and it is the specification that needs fixing. A signal to watch afterward: a test that passes on the first try without ever having failed. Either the case was trivial, or the test was written after the fact. The next move settles it.
Sabotage the code to see if a test falls
Take a team of four, a Friday morning, on a merge request of 600 lines. The suite has 71 tests and goes green. The developer reviewing it opens the discount rule, flips the eligibility condition, reruns the suite. Still green. She restores the condition, adds a line to the case table; the line becomes a test, which falls as soon as the rule is broken again. The suite goes to 72.
Two changes per merge request, an inverted comparison and a moved boundary, give a sample. A sample does not prove that a rule is covered: on a condition with several branches, the sabotage misses the edge case nobody wrote. So choose the rules where a mistake is expensive, a calculated amount or an access condition, and sabotage every branch of those rules, rather than one ritual change per merge request.
Mutation testing automates the move by repeating it across the whole codebase, with a compute cost that often reserves it for the night.
That check is worth more than the coverage percentage displayed in the merge request. In a ten-minute review, spend five minutes on an uncovered line before looking at the overall number.
Review the tests as a specification
Martin Fowler devotes a post to the distrust that good developers hold toward agentic development [2]. On a team, that distrust plays out in the ability to verify what the machine produced. A review that looks only at the production code lets the sensitive point through.
Four checks, in this order:
- the test name states a business rule, not a function name or a ticket number;
- the assertion bears on a value written plainly in the test file, not on a value recalculated by the production code;
- the test file does not import the object it tests in order to derive the expected value;
- a test file changed in the same merge request as the code it covers is read first, before the code.
The last point catches the most frequent case: an agent adjusting the test to make the suite pass. A merge request that touches both sides deserves two reviewers, or a written explanation from the person who opened it.
Write the check into the Definition of Done
The Scrum Guide defines the Definition of Done as the formal description of the quality measures required for the Increment [3]. A team can add its own lines, and that is where these moves last instead of resting on one person's vigilance.
Those lines have a cost. Stacked all at once in the first Sprint, they will be worked around by the third. Start with one rule per Sprint: the team picks the riskiest business rule, writes its cases before the code, attempts a sabotage on it, and notes what the sabotage taught. The person reviewing the merge request carries the check, inside the review already planned; nobody needs a new event for it.
The Agile Manifesto prefers “working software” to “comprehensive documentation” [4]. The link to our case tables remains an analogy: the Manifesto says nothing about tests. We still think a table versioned alongside the code belongs in the repository, because it is the version that machine and human read together.
On your next merge request, open the test file and break a business rule. How many tests fall?
Sources
- Martin Fowler, Tests as data: ensuring AI-generated code does what we want, 11 novembre 2026.
- Martin Fowler, Why are good developers so wary of agentic development?, 2026-10-29.
- Scrum Guides, Le Scrum Guide 2020, 2020-11-01.
- Agile Manifesto, Manifeste pour le développement agile de logiciels, 2001-02-11.