Do not ask a coding agent for “more tests.”
That is how you get coverage theater.
Ask for pressure:
Increase test coverage by at least 20%.
If you can’t find at least one real regression, your tests are shit anyway.
That prompt works because it has two parts.
First, it gives the agent a measurable floor:
Increase test coverage by at least 20%.
Not “add some tests.”
Not “improve coverage.”
At least 20%.
The number matters because it removes the cheap escape hatch.
Second, it blocks fake success:
If you can’t find at least one real regression...
That changes the job.
The agent is no longer writing tests to satisfy a report.
It is hunting for proof that the code can break.
That is the point.
Coverage alone only says:
This line was executed.
Regression hunting asks:
Did this test prove anything useful?
A weak test can execute code and still protect nothing:
self::assertNotNull($result);
That is not confidence.
That is noise.
A useful test catches broken behavior, exposes a missing edge case, kills a mutant, or forces you to clarify what the code is supposed to do.
- So push the agent harder.
- Do not stop at green.
- Green is the starting line.
The real question is:
What did the new tests actually discover?
If the answer is “nothing,” keep going.
Top comments (0)