Reduce test maintenance and flaky tests | Katalon Studio
Katalon Studio Solutions
Reduce test maintenance and flaky test failures
A UI change shouldn't break 30 tests. Katalon Studio matches a fix to each cause of flakiness, from broken locators to timing, and nothing changes in your tests until you approve it.
Start free trial See how it works
Updated September 2026
Self-healing Insights 3 proposed fixes
Run finished on alternative locators. Review each fix below.
| Locator | Proposed Fix |
|---|---|
| btn_Checkout | Attributes //button[@id='checkout']//button[@data-test='checkout'] |
| input_Email | XPath #email-field //input[@name='email'] |
| lnk_Account | AI self-healing //a[text()='My account']//nav//a[@href='/account'] |
The problem
Why test maintenance eats your sprint
Most flaky tests aren't random. They come from a handful of causes, and rerunning the job fixes none of them.
A UI change breaks dozens of tests
A renamed ID or a moved button fails every test that touches it, and each one needs the same fix.
Timing failures come and go
The element wasn't ready, the animation hadn't finished, and the test passes on the second run.
Red builds stop meaning anything
When the team can't tell a flaky failure from a real bug, they rerun until it's green and real bugs slip through.
Fixing tests crowds out writing them
Coverage stalls because the week goes to keeping yesterday's tests alive.
The financial risk of flaky tests
How Katalon Studio reduces test maintenance
Match the fix to the cause.
| Cause | What you see | What Studio does | Plan |
|---|---|---|---|
| The UI changed | Element not found after a release | Locators live in the object repository, so one fix reaches every test. Classic self-healing tries your other locators in the order you set. If they all fail, AI self-healing looks at the page source, accessibility tree, and screenshots to find the element. | Object repository: Free Self-healing: Paid plans |
| Timing | Passes on rerun, fails at random | Smart Wait waits for page loading, visibility, animations, and editability on web before each step. | Free |
| Environment noise | Fails in CI, passes locally | Retry failed executions immediately or after the whole run, and run in the same setup every time with the Katalon Docker Image or Test Cloud. | Retries: Paid plans |
| Flaky or real? | Reruns hide real bugs | Screenshots and video at the point of failure. With Katalon True Platform, a flakiness score across your run history shows which tests are unstable. | Reports: Free True Platform: separate product |
Self-healing
You approve every fix
- Console Log Viewer
Book appointment Running Passed Open browser Navigate to /appointment Click btn_BookAppointment Self-healed Verify confirmation 1 locator recovered. Review it in Self-healing Insights.
- Log Viewer Self-healing Insights 1
Test object Screenshot
btn_BookAppointment XPath Broken //button[@id='book-btn'] Proposed //button[@id='book-appt'] Preview
Screenshot at recovery Book appointment
- Console Self-healing Insights 1
btn_BookAppointment Recovered by XPath Broken //button[@id='book-btn'] Proposed //button[@id='book-appt']
Saved as default Discard Approve
Self-healing handles locator changes. It won't fix a timing issue, bad test data, or a real bug, which is why the other fixes above exist.
Set up self-healing in three steps
- 01 Switch on self-healing for Web UI or Mobile in your project settings.
- 02 Order your locator methods (XPath, Attributes, CSS, Image, Smart Locator), most stable first.
- 03 To add AI self-healing, switch on Execution Viewer in Project Settings > Execution and choose your AI model, or use your own API key.
Self-healing tests in Katalon Studio
What keeps your tests stable
Object repository
Fix a locator once and every test that uses it picks up the fix.
Smart Wait
Fewer timing failures on web, without hard-coded sleeps.
Classic self-healing
Falls back to your other locators when the default breaks.
AI self-healing
Finds the element from the page source, accessibility tree, and screenshots when every locator fails.
Self-healing Insights
Review each proposed fix and approve or discard it.
Retry failed executions
Separate one-off failures from real ones.
What changes for your team
- Fix a broken locator once, not in 30 scripts
- Stop adding sleeps to get a green run
- Review healed locators instead of hunting for them
- Red builds that mean something again
- Less of each sprint spent on keeping old tests alive
- Know which tests are flaky before release day, with Katalon True Platform
- Recorded tests that survive the next UI change
- Fixes you can review without reading code
Stable in CI, not just on your machine
Most flaky failures show up in the pipeline. Run the same tests, in the same environment, every time, and send the results where your team already looks.
Run from any CI tool
Katalon Runtime Engine runs your suites from the command line, so any pipeline can trigger them, with retry rules applied on every run.
The same environment every run
Most "fails in CI, passes locally" failures come from environment drift. Pin it with a container, or let Test Cloud supply the browsers.
Results where your team looks
Failures arrive with screenshots and video attached. With Katalon True Platform, a flakiness score shows which tests are unstable across runs.
Rerun and hope vs fix by cause
| Situation | Rerun and hope | Katalon Studio |
|---|---|---|
| Broken locator | Edit it in every script that uses it | Fix it once in the object repository, or approve a healed locator |
| Timing failure | Add a sleep and move on | Smart Wait handles page timing on web |
| Intermittent CI failure | Rerun the job until it's green | Retry rules, and the same environment every run |
| Flaky or real? | Guess | Evidence at the point of failure, plus a flakiness score with True Platform |
| What changes in your tests | Whatever someone edited | Only what you approve |
Frequently asked questions
What causes flaky tests?
Most flaky tests come from a few causes: locators that break when the UI changes, timing issues where an element isn't ready yet, test data or environment differences between runs, and shared state between tests. Each cause needs a different fix, which is why rerunning rarely solves the problem.
How does self-healing work in Katalon Studio?
When a test's default locator fails, Studio tries your other locators (XPath, Attributes, CSS, Image, Smart Locator) in the order you set. If none of them work, AI self-healing can analyze the page source, accessibility tree, and screenshots to find the element. Proposed fixes appear in Self-healing Insights for you to review.
Will self-healing change my tests without me knowing?
No. The run can continue on an alternative locator, but the permanent change waits in Self-healing Insights. You approve a fix to save it as the new default, or discard it.
Does self-healing work for mobile tests?
Yes. Self-healing works for Web UI and Mobile tests, with separate settings for each.
Do I have to use AI?
No. Classic self-healing, Smart Wait, and the object repository don't use AI. AI self-healing uses the model set in your AI configuration, or your own API key.
Can Katalon find flaky tests across runs?
Yes, with Katalon True Platform. It calculates a Probabilistic Flakiness Score from pass-to-fail patterns in your test history, so you can see which tests are unstable.
Is self-healing included in the Free plan?
No, self-healing is on paid plans. Smart Wait, the object repository, and built-in reports are on the Free plan.