Engineering
How Regresco classifies test failures: regression vs broken locator vs flaky
By Sergei Pustovalov · 9 May 2026 · Updated 5 November 2026 · 6 min read
A red regression dashboard tells you nothing on its own. Three failures could mean three real product bugs, three brittle selectors that need updating, three flaky steps that will pass on the next run, or any combination. It's easy to treat all three the same way: glance, sigh, ignore. That's how regressions reach production.
The default user experience of test runners is "did it pass or fail?" That's the wrong primary signal for a small team without dedicated QA. The right primary signal is "what kind of failure is this and does it need my attention?"
This is how Regresco's classifier works. It's a set of rules applied consistently, with no AI model involved, and you could build something similar in your own setup if you invested the time.
The three categories
Every failed step gets classified into one of:
REGRESSION
The step passed before with the same selector and fails now, or a request the page itself made failed around it. The product probably broke. This is the category that matters: likely bugs that need a look before promoting to production.
BROKEN_LOCATOR
The selector didn't match one visible element, and this step has never passed with it. Usually the test is looking for a CSS class, ID, or text that isn't there, so the fix is to update the selector and leave the deploy alone.
FLAKY
The step alternates: it failed, passed again, and failed now. Errors that look temporary, such as a navigation timeout, a network error or a crashed page, land here too. More on flake categories here. The right action depends on severity and the importance of the path being tested.
One more label sits outside the three: blocked by bot protection. Cloudflare or a CAPTCHA stopped the browser, which says nothing about the flow.
How it decides
The classifier looks at three signals: the error message, the run history of that specific step, and the requests the page itself made while the step ran.
Error message patterns
Browser-test errors come in recognizable shapes. Some are deterministic signals:
- "strict mode violation: locator resolved to N elements" → BROKEN_LOCATOR (the selector is matching the wrong thing now)
- "net::ERR_CONNECTION_REFUSED" or a navigation timeout → FLAKY (network, not a real product break)
- "Target closed" or "page crashed" → FLAKY (transient browser instability)
- "Waiting for selector", or a check that didn't find its element → BROKEN_LOCATOR, until the step's history says otherwise
- Anything else, such as an API step getting the wrong status → REGRESSION (the product behaved unexpectedly, the test was right)
The list grows as new shapes turn up.
Run history
The strongest signal is what this specific step has done across its last 20 results. Only results of the same step count, so editing a selector starts its history over. Three patterns:
- Passed before without auto-heal, fails now → REGRESSION
- Failed, passed again, failed now → FLAKY (it alternates)
- Never passed → what the error text says
History settles cases the error message alone can't. A run of failures at the end of the history isn't flakiness: that's a step that stopped working, so it stays REGRESSION. An error that already reads as temporary stays FLAKY whatever the history says.
The page's own requests
A flow's first run has no history, and a missing element on its own reads like a wrong selector. So if a request the test set off failed during the step or the one before it, with a 5xx, or a POST, PUT, PATCH or DELETE answered 404, 405 or 410, the step is REGRESSION: the test pressed the button and the app wasn't there to take it. A 400, 401 or 422 doesn't count, because the app may mean it: a wrong password, a form that didn't validate. Neither does a GET answered 401 or 404, because many sites do that all day, or a request to the site's analytics.
Why three categories and not five
Separate buckets for "network error", "browser crash", "selector ambiguity", and "assertion mismatch" would be more exact and less useful: it's hard to know what to do with each.
The actual decision a triage person makes is binary at first ("does this need my attention right now?") and then trinary ("if yes, do I fix the product or fix the test?"). Three categories map cleanly to three actions: roll back the deploy (REGRESSION), update the test (BROKEN_LOCATOR), or wait and see if it self-resolves (FLAKY). More granularity is just noise at this stage.
What it doesn't classify
Two things the classifier explicitly doesn't try to do:
- Severity ranking within a category. A REGRESSION on the login flow and a REGRESSION on the help page are both labeled REGRESSION. The triage person decides which is more urgent. The classifier doesn't prioritize across user paths.
- Fix suggestions for REGRESSION. The classifier's job is to flag the failure as worth investigating, and the investigation stays with you.
Auto-heal is a separate system that runs before a step fails. When the selector of a click or fill doesn't match, it looks for the one element on the page with exactly the same name. If that works, the step is marked as auto-healed, with the replacement offered in the editor. A check is never replaced: passing it on something else would hide the very regression it's there to catch.
When the classifier is wrong
These are rules, so they can be wrong. Cases that trip them up:
- A real regression that happens to manifest as a network error (an upstream service started returning 500s because of a deploy)
- A flaky step that always fails the same way, looking like a deterministic regression
- A BROKEN_LOCATOR that's actually a regression (the missing element wasn't refactored, it failed to render)
For these, the run page shows the label next to what happened and the screenshot, so you can judge for yourself. There's no button to change a label: treat it as a hint, and look at the step when being wrong would cost you.
See the classifier in your own dashboard
Free plan, 20 runs a month, no card. Run a few flows, intentionally break one, and watch the classification badges update across runs.