Guides~6 min read
Real Bug or Flaky Test? How to Tell the Difference
How to tell if a failed automated test is a real bug or a flaky test: a practical triage routine, why flakiness happens, and where independent checks help.
TL;DR
A failed test is a real bug when the failure points at a product defect and reproduces under the same conditions. It is flaky when the cause is timing, shared state or an unstable selector. The fastest way to tell is evidence: a recording and clear steps, plus an independent check before triage.
Key takeaways
Reproduction: A real bug reproduces under the same conditions. A flaky failure changes with timing, order or environment.
Evidence: A recording and exact steps settle many arguments faster than rerunning a test and hoping.
Mechanism: Flakiness comes from timing, shared state, test data and brittle selectors, so each cause has its own check.
Cost of hand triage: An unverified red run can pull an engineer into an investigation that ends in nothing.
Independent verification: TaloTrace independently verifies each finding before it reaches you, so the findings you triage have been checked once already.
How Do You Tell If a Failed Automated Test Is a Real Bug or a Flaky Test?
A real bug is a failure caused by a defect in the product that appears again whenever the same conditions hold. A flaky test is one that fails or passes inconsistently against the same code because something other than the product changes between runs. A failed automated test is a real bug when the app behaved wrongly and the failure reproduces under the same conditions. It is a flaky test when the failure depends on timing, test order, shared data or an unstable selector rather than on a defect in the product. The deciding evidence is what the app actually did on screen at the moment of failure, not the red mark in the report.
The hard part is getting the evidence to tell the two apart. TaloTrace drives your app, records what looks wrong and independently verifies each finding before it reaches you. The rest of this post walks through the symptom and its causes, then a triage routine, then where independent verification fits.
What Does a Week of Red Test Runs Actually Look Like?
Monday morning, the overnight run is red. Several tests failed, and nobody knows which failures matter. An engineer opens the first one, reads a stack trace that says an element was not found, and reruns the test. It passes.
So the failure goes in the pile marked flaky. The next one takes longer, because the rerun fails again and the engineer has to work out whether the app broke or the test did. By Wednesday the team has spent real hours on failures that mostly turned out to be nothing, and one that turned out to be something.
The damage is not just time. When red runs are routinely noise, people stop reading them. A real regression then sits in the same list as the failures everyone has learned to ignore, and it gets the same shrug.
Why Do Tests Fail When Nothing Is Actually Broken?
Flaky failures come from a handful of mechanisms, and each one leaves a different fingerprint. Reasoning from how software works is more reliable than any rule of thumb.
- Timing: The test acts before the app is ready, or waits a fixed interval that is sometimes too short. The failure moves around between runs.
- Shared state: Tests depend on data or settings left behind by other tests. The result changes with execution order.
- Test data: An account, record or environment is in a different condition than the test assumed.
- Brittle selectors: The test finds elements by structure or IDs that were never meant to be stable. A harmless UI change breaks it.
- Environment: A slow device, a network hiccup or a service that is down produces a failure unrelated to your code.
A real bug looks different. It tends to fail the same way, at the same step, whenever the same conditions hold. It often appears right after a specific change, and the recording shows the app doing something wrong, not the test losing its place.
What Is a Practical Triage Routine for a Failed Test?
Work through the checks in order of cost, cheapest first. Stop as soon as one gives a clear answer.
- Read the failure, not the status. Does the message describe wrong product behaviour, or a missing element and a timeout?
- Look at what the app showed. A recording or screenshot at the point of failure often answers the question in seconds.
- Rerun under the same conditions. A failure that repeats at the same step suggests a defect. One that moves suggests timing or state.
- Run it alone. If it passes in isolation and fails in the full run, suspect shared state or order.
- Check what changed. A failure that starts right after a particular change deserves suspicion for that change.
- Write down the verdict. Record why you called it, so the next person does not repeat the investigation.
This routine works. Its weakness is that a person has to run it for every red test, and the cost grows with the number of failures, not with the number of real bugs.
What Do Teams Usually Try, and Where Does It Run Out?
Teams commonly try a few things, and each helps for a while before it runs out.
- Automatic retries: They make red runs go green, but they also hide real intermittent defects. A race condition in the product looks exactly like a flaky test when the retry passes.
- Quarantining flaky tests: It keeps the pipeline moving, but a quarantined test stops protecting you, and the quarantine list can keep growing if nobody owns it.
- Adding waits and tightening selectors: It fixes individual tests, but script maintenance can grow with the surface area of the app, and releases can create fresh breakage elsewhere.
- Doing nothing: It is also a choice, and it teaches the team to ignore red.
All of these treat the symptom after a failure exists. None of them check the finding itself before a person has to spend time on it.
What Does a Different Approach Look Like?
A different approach puts independent verification before triage, so the failures reaching a human have already been checked. That addresses two parts of the problem above: breakage caused by brittle selectors, and unverified failures reaching you, since each finding is independently verified and backed by a recording before it reaches you. It does not address every cause of flakiness, and it does not promise that tests stop breaking.
The approach has three pieces. The next section shows how TaloTrace does each.
- Independent check: Each finding is verified before a person sees it.
- Attached evidence: The finding comes with a recording of the failure.
- Deduplication: Repeated observations of the same defect collapse into a single issue.
What Makes TaloTrace Different for Triaging Failures?
TaloTrace separates finding a bug from reporting it. It drives your app and records what looks wrong, then independently verifies each finding before it reaches you. Nothing you see is the raw, unchecked output of the step that produced it.
Three details matter for the real-bug-or-flaky question:
- Evidence on every finding: A screen recording is captured for every run, and each finding carries the time window inside that recording where the defect shows. A Run produces a set of Findings, each backed by the recording, TaloTrace's reasoning and step-by-step reproduction, including the Evidence panel.
- Sight-based navigation: TaloTrace navigates by looking at the screen, not brittle element IDs, so it keeps working when the UI changes. That removes one source of selector breakage, with no test scripts to write or maintain.
- Deduplication: Repeated observations of the same defect collapse into a single issue within a run. Across runs, a candidate matching an issue TaloTrace already tracks is routed to that issue instead of surfacing as new.
Results also start hidden. Findings become visible only when a reviewer approves them, or when the project is configured to auto-approve. Low-confidence findings are held separately, and only an explicit per-finding decision releases them. You can read more about how TaloTrace works on the how it works page.
You still make the final call on what to fix. The difference is that the call starts from a verified finding with a recording, not from a bare stack trace. Severity ratings can also follow your own triage guidance through a per-project rubric, so the ranking reflects how your team decides what matters.
How Do You Start Moving Triage Upstream?
Start by measuring where your hours go. For one week, note how many red tests ended in a real bug and how long each verdict took. That tells you whether the problem is flaky tests, slow evidence gathering, or both.
Then pick one app or flow that causes the most noise and run it through a process that verifies findings independently. TaloTrace tests web, iOS and Android apps on cloud-hosted virtual devices, and you can start runs on demand from the app or API, or on a daily or weekly schedule. If you want to see how that fits your own red runs, we can walk through it with you.
Talk to us about your current failure pile.
Frequently asked questions
Is a test that passes on rerun always flaky?
Not necessarily. A pass on rerun shows the failure did not reproduce under that second set of conditions, which points to timing, state or environment. It can still hide a real race condition in the product, so check the recording and logs before dismissing it.
What is the fastest first check on a failed automated test?
Look at the evidence from the failed run before touching the code. A screen recording and the exact steps show whether the app misbehaved or the test lost its footing. TaloTrace captures a screen recording for every run and ties each finding to the time window where the defect shows.
Does TaloTrace remove flaky tests?
No. TaloTrace navigates by looking at the screen rather than brittle element IDs, so it keeps working when the UI changes, which removes one common source of breakage. It does not claim to remove every cause of flakiness.
How does TaloTrace decide a finding is worth reporting?
TaloTrace separates finding a bug from reporting it. It drives your app and records what looks wrong, then independently verifies each finding before it reaches you. Findings are hidden until a reviewer approves them, unless the project is configured to auto-approve.
Does TaloTrace run on every pull request?
No. TaloTrace runs on demand, from the app or the API, or on a daily or weekly schedule. Running on pull requests is not something TaloTrace offers today.
Why does the same bug show up many times in a red run?
One defect can be observed in several places or steps. TaloTrace collapses repeated observations of the same defect into a single issue within a run, and routes a candidate that matches an issue it already tracks to that issue rather than showing it as new.