Blog 7 min read
False positives in automated testing: when a green test lies
- test-automation
- software-testing
- e2e-testing
- quality-assurance
- monitoring
The dashboard is green. The pipeline is green. The scenario is marked “PASS”. Yet the customer did not get the expected result.
This is one of the most dangerous problems in automation: a test that inspires confidence without actually proving that the service works. A red test immediately draws attention. A false green, on the other hand, can approve a release, hide an outage or distort an availability indicator.
So the question is not only how to make tests stable. Their verdict has to be trustworthy.
1. False positive, false negative and flaky test: three different problems
| Situation | What the test says | Reality |
|---|---|---|
| False positive / false green | PASS | The expected behavior is not actually met |
| False negative | FAIL | The service works, but the test wrongly concludes it failed |
| Flaky test | PASS or FAIL depending on the run | The signal is not deterministic under supposedly identical conditions |
These categories can overlap in practice. A flaky test can turn green after a retry; if that retry is hidden, reporting paints an artificially reassuring picture.
2. The first false green: “the script reached the end”
An automation framework runs actions. Clicking, typing, waiting and navigating without throwing an exception only proves that those actions could be performed.
To turn the execution into a test, you have to evaluate the result. Selenium itself describes functional automation as a combination of three steps: set up the data, perform a discrete set of actions, then evaluate the results.
A payment journey should therefore not be declared successful because the “Confirm” button was clicked. You need to verify an observable business state: transaction confirmed, reference created, consistent balance, expected backend status or another proof defined by the requirement — which is the whole point of testing a 3-D Secure mobile payment end to end.
3. Element present ≠ business success
An overly weak UI assertion is a classic source of false greens. Finding a “Success” text or a visible component may not be enough if that element exists in several states, stays displayed after an error or does not yet reflect the server state.
A robust assertion should be as close as possible to the business intent. For a transfer, for instance, you can check the confirmation, a transaction reference and, where possible and authorized, match the displayed result against an API or backend state.
The principle is simple: the higher the business impact of the journey, the stronger the proof of success must be.
4. Fixed waits create fragile signals
Modern interfaces are asynchronous. The DOM can be loaded while JavaScript calls, animations or business data are not. Selenium identifies these race conditions between the browser and WebDriver as one of the primary causes of flaky tests.
Adding sleep(5000) everywhere does not solve the problem: five seconds can be too long when the service is fast and too short when it is slow. As Selenium points out, the code cannot know exactly how long it needs to wait, and its synchronization mechanisms (implicit or explicit waits) are better.
Wait for an observable state instead: element visible and actionable, expected business status, a loader disappearing, a relevant network response or another explicit condition. Playwright, for example, checks before a click that the element is visible, stable, receives events and is enabled; its assertions retry until the condition is met or the timeout (5 seconds by default) is reached.
5. A retry that passes does not erase the first failure
Retries are useful to diagnose and handle some intermittent failures, but they become dangerous when they silently turn a first failure into a PASS.
When retries are enabled, Playwright explicitly distinguishes three categories: “passed” (passed on the first run), “flaky” (failed on the first run, then passed on retry) and “failed” (failed on every attempt). That distinction should be kept in quality dashboards.
For a quality gate, QoS monitoring or a reliability analysis, PASS and PASS_AFTER_RETRY should not necessarily mean the same thing.
Trust principle — A retry is information, not an eraser. If run N fails and run N+1 passes, the instability must stay visible.
6. Test data can manufacture an artificial green
A journey can pass with a privileged account, an already registered beneficiary, a balance that is always sufficient or preconfigured data that skips a real branch of the service.
The test is technically correct but no longer covers the risk its name implies. Preconditions must therefore be explicit and checked before the action: account type, balance, beneficiary state, permissions, app version, environment and required data.
For transactional journeys, the test data is part of the test.
7. External dependencies are part of the E2E verdict too
A simulated OTP, a mocked payment or a bypassed third-party service can be perfectly legitimate in a given test layer. The problem arises when that result is then presented as E2E proof for production.
The previous articles in this series illustrate the point: if the goal is to genuinely validate the reception of an SMS OTP or the payment challenge, those components must stay within the scope of the scenario.
The test level must therefore be clearly labeled: component, integration, controlled E2E or real E2E.
8. A hierarchy of evidence for declaring PASS
| Level | Example of evidence | Strength |
|---|---|---|
| 1. Technical | No driver exception | Weak |
| 2. UI | Expected state or text visible | Medium |
| 3. Business | Reference, status, balance or expected functional result | Strong |
| 4. Cross-checked | UI + correlatable API, backend or log when available | Very strong |
| 5. Timed E2E | Business outcome + a defined time objective met | Suited to QoS monitoring |
Not every scenario needs the highest level. The level of evidence should be proportionate to the business risk and to how the result is used — level 5 follows the logic described in “Automated testing vs QoS monitoring: what is the difference?”.
9. Execution evidence is essential
When a critical test fails — or when a green is challenged — you need to be able to reconstruct what happened. Screenshots, video, robot logs, timestamps, non-sensitive scenario data and possibly browser console logs explain the verdict.
This evidence does not replace assertions. It makes the execution auditable and speeds up analysis.
For continuous monitoring, it also helps distinguish a real outage from a problem with the robot or its environment.
10. Towards a “trustworthy green”
The goal of a testing platform should not be to artificially maximize the share of green. It should be to maximize confidence in every verdict.
A few rules can be formalized: mandatory business assertions for critical journeys; conditional waits rather than arbitrary delays; flaky status kept after a retry; controlled preconditions; execution evidence; clear classification of simulated versus real dependencies.
This discipline becomes even more important with AI and self-healing. A system can repair a broken locator. It must never silently change what the test is meant to prove just to get back to green.
11. The SYMA ROBOT approach
In SYMA ROBOT, the aim is to make the test result an explainable object: executed steps, assertions, screenshots, video, logs and timings attached to the journey.
On critical scenarios, the target logic is to distinguish an automation failure from a business failure and, step by step, to enrich the verdict by correlating it with the signals available around the journey.
This approach also paves the way for two key building blocks: quality gates that block a release only on reliable criteria, and self-healing that repairs the execution without rewriting the business intent.
Key takeaway — A good test is not the one that turns green. It is the one whose green is credible proof that the expected behavior was actually achieved.
Conclusion
False greens are more dangerous than red tests because they silently destroy trust in automation. The answer is not more retries or more permissive assertions. It is defining what “success” really means, waiting for the right states, controlling the data, keeping instability visible and producing the evidence needed to explain every verdict.
Your tests are green, but are you sure they prove the business outcome? Request a SYMA ROBOT demo: E2E execution, assertions and evidence for a usable quality signal.
Sources
Documentation consulted on November 1, 2026. Official framework documentation is preferred; these references are not endorsements.
- Selenium — Overview of Test Automation, Waiting Strategies and Test Practices
- Playwright — Auto-waiting (actionability), Assertions, Retries and Best Practices
- Google Testing Blog — Test Flakiness: One of the main challenges of automated testing