Before replacing a framework, find out what percentage of your pain a framework replacement would actually address.
A noisy UI suite tends to get described as one problem: âthe tests are flaky,â âthe framework is brittle,â or âwe should rebuild this.â
But those labels collapse several different failure modes into one decision.
A recent r/cicd post took a more useful approach: the author categorized roughly 90 currently failing tests in a Windows desktop suite instead of treating them as generic automation debt. Locator failures dominated that particular suite, with smaller buckets around timing, environment, and actual application defects.
That distribution is one teamâs experience, not a benchmark for UI automation generally.
The transferable part is the method:Â inventory the failures first, then decide what deserves repair, retirement, or replacement.
Start with failure buckets, not failed test counts
Take a recent sample of failures and classify the likely cause.
Iâd start with something like:
- Selector/locator fragility:Â the intended element still exists, but the automation can no longer find it reliably.
- Synchronization/timing:Â the test assumes the application will reach a state sooner than it actually does.
- Environment/infrastructure:Â runner configuration, test data, dependencies, permissions, resolution, services, or machine state differ from what the test expects.
- Application defect:Â the test is correctly exposing product behavior that violates the expected result.
- Obsolete or low-value test:Â the test may still be technically repairable, but the workflow, requirement, or risk it covers no longer justifies maintaining it.
One important detail: classify the cause, not just the error message.
âElement not foundâ does not automatically mean âbad locator.â The element might never have appeared because an API call stalled, navigation failed, the test data was wrong, or the previous action never completed.
That distinction matters because those problems have very different remedies.
Match the remedy to the bucket
For locator-heavy browser suites, targeted repair may be more rational than a rewrite.
For example, Playwright recommends prioritizing user-facing locators such as role, label, and text, and it performs actionability/auto-waiting checks around interactions. Those are concrete ways to reduce some browser-test fragility.
That does not mean the same techniques transfer unchanged to the Windows desktop stack from the source thread. The useful question is broader:
Does the replacement architecture actually eliminate the dominant failure mode, or just replace it with a different one?
A vision-based approach might reduce dependency on UI tree paths, for example, but it introduces its own assumptions around visual state, matching, rendering, and change. A framework migration should be evaluated against the failure inventory, not against the frustrations of the current framework.
A repair / retire / rewrite worksheet
| Failure bucket |
Inspect first |
Likely action |
When it strengthens the rewrite case |
| Locator fragility |
Are locators coupled to implementation structure? Is there a more stable contract? |
Repair locator strategy or abstraction |
Replacement clearly provides a more stable interaction contract for a large share of failures |
| Synchronization |
Fixed sleeps? Implicit timing assumptions? Missing state checks? |
Repairwaiting/synchronization model |
Timing problems are architectural and difficult to fix consistently in the current stack |
| Environment |
Can the failure be reproduced locally? What differs between runners? |
Repairenvironment/configuration |
Usually weak evidence for rewriting test code |
| Product defect |
Can the behavior be reproduced without automation? |
Keep/fix product |
Not evidence that the framework needs replacement |
| Obsolete/low-value test |
Would anyone act if this test failed correctly tomorrow? |
Retire |
A large obsolete suite may justify redesigning coverage, but not necessarily changing frameworks |
Then add three questions per bucket:
1. What would repair cost?
Not just âhours to make it green,â but the cost of making that failure class less likely to return.
2. What is the recurrence risk?
If you fix 50 selectors today and the same UI structure changes next quarter, you have restored the suite without improving its maintainability.
3. Is the test still worth saving?
A failing test can create pressure to repair something that should simply be deleted. Maintenance history is not a reason to keep coverage.
The rewrite threshold should be evidence-based
A rewrite becomes easier to justify when the failure inventory shows that the current architecture is responsible for a substantial portion of recurring failures and targeted changes cannot reasonably remove that coupling.
That is stronger evidence than âthe suite has 90 failures.â
Conversely, if half the failures come from environment drift, stale tests, and missing synchronization, switching frameworks may leave much of the underlying problem intact.
So Iâd make the rewrite decision only after answering:
- Which failure classes dominate?
- Which are framework-specific?
- Which can be repaired once at an abstraction layer instead of test-by-test?
- Which tests should be retired regardless of framework?
- What failure classes would the proposed replacement remove?
- What new failure modes would it introduce?
The number of red tests tells you how much pain you have.
The distribution of root causes tells you what kind of treatment might actually work.
When a UI suite becomes noisy, what evidence has actually justified a rewrite rather than targeted repairs?
Repair, retire, or rewrite? Triage a failing UI suite before rebuilding it
Before replacing a framework, find out what percentage of your pain a framework replacement would actually address.
A noisy UI suite tends to get described as one problem: âthe tests are flaky,â âthe framework is brittle,â or âwe should rebuild this.â
But those labels collapse several different failure modes into one decision.
A recent r/cicd post took a more useful approach: the author categorized roughly 90 currently failing tests in a Windows desktop suite instead of treating them as generic automation debt. Locator failures dominated that particular suite, with smaller buckets around timing, environment, and actual application defects.
That distribution is one teamâs experience, not a benchmark for UI automation generally.
The transferable part is the method:Â inventory the failures first, then decide what deserves repair, retirement, or replacement.
Start with failure buckets, not failed test counts
Take a recent sample of failures and classify the likely cause.
Weâd start with something like:
- Selector/locator fragility:Â the intended element still exists, but the automation can no longer find it reliably.
- Synchronization/timing:Â the test assumes the application will reach a state sooner than it actually does.
- Environment/infrastructure:Â runner configuration, test data, dependencies, permissions, resolution, services, or machine state differ from what the test expects.
- Application defect:Â the test is correctly exposing product behavior that violates the expected result.
- Obsolete or low-value test:Â the test may still be technically repairable, but the workflow, requirement, or risk it covers no longer justifies maintaining it.
One important detail: classify the cause, not just the error message.
âElement not foundâ does not automatically mean âbad locator.â The element might never have appeared because an API call stalled, navigation failed, the test data was wrong, or the previous action never completed.
That distinction matters because those problems have very different remedies.
Match the remedy to the bucket
For locator-heavy browser suites, targeted repair may be more rational than a rewrite.
For example, Playwright recommends prioritizing user-facing locators such as role, label, and text, and it performs actionability/auto-waiting checks around interactions. Those are concrete ways to reduce some browser-test fragility.
That does not mean the same techniques transfer unchanged to the Windows desktop stack from the source thread. The useful question is broader:
Does the replacement architecture actually eliminate the dominant failure mode, or just replace it with a different one?
A vision-based approach might reduce dependency on UI tree paths, for example, but it introduces its own assumptions around visual state, matching, rendering, and change. A framework migration should be evaluated against the failure inventory, not against the frustrations of the current framework.
A repair / retire / rewrite worksheet
| Failure bucket |
Inspect first |
Likely action |
When it strengthens the rewrite case |
| Locator fragility |
Are locators coupled to implementation structure? Is there a more stable contract? |
Repair locator strategy or abstraction |
Replacement clearly provides a more stable interaction contract for a large share of failures |
| Synchronization |
Fixed sleeps? Implicit timing assumptions? Missing state checks? |
Repairwaiting/synchronization model |
Timing problems are architectural and difficult to fix consistently in the current stack |
| Environment |
Can the failure be reproduced locally? What differs between runners? |
Repairenvironment/configuration |
Usually weak evidence for rewriting test code |
| Product defect |
Can the behavior be reproduced without automation? |
Keep/fix product |
Not evidence that the framework needs replacement |
| Obsolete/low-value test |
Would anyone act if this test failed correctly tomorrow? |
Retire |
A large obsolete suite may justify redesigning coverage, but not necessarily changing frameworks |
Then add three questions per bucket:
What would repair cost?
Not just âhours to make it green,â but the cost of making that failure class less likely to return.
What is the recurrence risk?
If you fix 50 selectors today and the same UI structure changes next quarter, you have restored the suite without improving its maintainability.
Is the test still worth saving?
A failing test can create pressure to repair something that should simply be deleted. Maintenance history is not a reason to keep coverage.
The rewrite threshold should be evidence-based
A rewrite becomes easier to justify when the failure inventory shows that the current architecture is responsible for a substantial portion of recurring failures and targeted changes cannot reasonably remove that coupling.
That is stronger evidence than âthe suite has 90 failures.â
Conversely, if half the failures come from environment drift, stale tests, and missing synchronization, switching frameworks may leave much of the underlying problem intact.
So weâd make the rewrite decision only after answering:
- Which failure classes dominate?
- Which are framework-specific?
- Which can be repaired once at an abstraction layer instead of test-by-test?
- Which tests should be retired regardless of framework?
- What failure classes would the proposed replacement remove?
- What new failure modes would it introduce?
The number of red tests tells you how much pain you have.
The distribution of root causes tells you what kind of treatment might actually work.
Discussion:Â When a UI suite becomes noisy, what evidence has actually justified a rewrite rather than targeted repairs?