A passing test is a false green when it checks what the app says instead of what the app does. To catch one, assert the real outcome where it is stored (database, API or downstream system), break the app on purpose to confirm the test fails, and review every repair so it keeps the original assertions.
A false green is a test that passes while the product is broken. It usually happens when a test checks a signal on screen, like a confirmation message or a redirect, instead of the result the business depends on. The suite stays green, and customers find the bug first.
As AI coding agents write more tests in seconds, this gets easier to miss. A test can look complete, run cleanly and still ask the wrong question.
We built a small coffee store app and planted one bug: payment goes through, but the order is never saved. Then we ran two Playwright tests against the same checkout.
|
Weak test |
Strong test |
|---|---|
|
Checked that the "Order confirmed" message appeared |
Checked that exactly one order was saved |
|
Passed |
Failed |
|
The customer was charged and no order existed |
Caught the real defect before a customer did |
Same flow. Same bug. Different question.
// Weak: checks what the app says
await expect(page.getByText('Order confirmed')).toBeVisible();
// Strong: checks what the app did
expect(orders, 'there must be exactly 1 saved order').toHaveLength(1);
Three habits make the biggest difference:
By making triage an agent's job instead of a person's.
The checklist adds three more checks that separate a green test from a trustworthy one, plus a quick score to see where your suite stands.
Amikoo is an AI QA agent that writes Playwright tests in your repo for your team to review. When a test fails, it tells you whether it's the product, the test or the environment, and proposes repairs your team reviews before merge.
A false green is a test that passes while the product is broken. It usually happens when the test checks a message on screen, like "Order confirmed", instead of the real result, like a saved order.
Break the app on purpose (seed a bug, disable a backend call or return a wrong value) and run the test. If it still passes, the test is not protecting that flow.
An automatic fix can make a failing test pass by loosening or removing the assertion that caught the bug. Reviewing the diff makes sure the fix changes how the test reaches the page, not what it checks.
Amikoo proposes repairs as changes your team reviews before merge. It also classifies each failure as a product defect, a test problem or an environment issue, so real defects are not hidden by a retry or a fix.