Why automated tests break
Most test failures have one of a few causes:
- The product changed. A button moved, a field was renamed, a step was added to a flow. Working tests begin to fail.
- A locator no longer matches. The test looks for an element by an identifier that changed.
- Timing and waits. The test checks before the page is ready, and passes on some runs only.
- Test data. The data the test expects is gone, changed or shared with another test.
- The environment. A service is down, a version differs, or several teams use the same data.
There are two kinds of maintenance. One is repairing working tests that begin to fail. The other is adjusting the tooling around them as the product and its dependencies move on. Before either, one question decides the work: is this failure a change in behaviour, a side effect, or a real defect?
Every red run sorted: defect, test fault or environment fault
Each failed CI run is sorted into one of three.
- A defect. The product is wrong. It goes to your tracker.
- A test fault. The test is wrong or outdated. It is repaired.
- An environment fault. The test and the product are right but the environment is not. It goes to whoever owns the environment.
CodeceptJS has an analyze plugin that groups failures with similar error patterns, which helps when one change turns many tests red at once. For wiring the suite into your pipeline in the first place, see CI/CD test automation.
Flaky tests: tracked until they are fixed or removed
A flaky test passes and fails on the same code. People re-run it, then ignore it, and then they ignore the red build. For each flaky test we look for the cause: data, timing, the environment or the way the test is written. The test is then fixed. A test that is not worth fixing is removed. Until then it is tracked, so it is not a silent problem. We do not promise that a suite will have no flaky tests, because the environment can cause them from outside the test code.
Self-healing tests: what they repair and what an engineer still checks
Self-healing test automation is a technique, not an outcome. Several tools offer it. Two test frameworks ship it as a feature, and their own documentation says what it does:
- Playwright’s healer agent replays a failing test and patches it, or marks it skipped if it believes the feature is broken.
- The CodeceptJS heal plugin heals failing steps on CI and prints a suggested change at the end of execution.
AI healing needs an AI provider in the configuration, heal recipes and the
--aiflag. The documentation is plain about its reach: it solves one problem, a locator that changed so an action such as a click cannot be performed. It works on actions, not on assertions, waits or values the test reads.
If your Playwright suite is not stable yet, taking over a Playwright suite comes first; upkeep starts after that.
Zapple.Tech was founded by the founders of CodeceptJS and Codeception, open-source testing frameworks, and of Testomat.io and Testomat.ai. CodeceptJS ships its own healing; the plugin is part of that framework, not our product.
We use these tools where your framework supports them. A healed step is a suggestion. It is opened as a pull request with the reason, and an engineer approves or rejects it before it is merged. That matters because a heal can pass for the wrong reason: the element that changed may be the bug. The longer description of the agent-driven way of working is under end-to-end testing with AI agents.
Keeping test automation maintenance cheap
Most of the cost of automated test maintenance is decided when a test is written. Tests that are cheap to keep follow a few rules:
- One behaviour per test, and small tests, so a failure points at one cause.
- Decide what to test before how. A test with no clear purpose is the first to be deleted.
- Documented test cases, so a repair can be checked against what the test was meant to do.
- Naming standards, so a failed test name says what failed.
- Stable IDs and page objects, so a change in the interface is fixed in one place.
- Work with the developers who change the interface. A fix made together with the change shortens the feedback loop.
New tests written under these rules are covered on the automated test script development page.
Taking over a suite someone else wrote
If the person who wrote the suite has left, or a framework nobody on your team understands any more has become the problem, the audit marks every test keep, rewrite or delete. That gives you a list before anything is changed. When the cost comes from the structure of the framework, the next step is framework rework, scoped separately.
The suite stays your code, in your repository, whichever of us maintains it.
When test maintenance is the wrong choice
- You need new tests, not repairs. See automated test script development.
- You want the whole automation project handed over. See test automation outsourcing.
- You want to build or extend regression coverage. See regression testing.
- You want engineers inside your team to look after the suite. See hire test automation engineers.
- You are still comparing kinds of automation work. The test automation services page lists them.
- You are not sure what is wrong with the suite. The one-week automation audit comes first.
What we maintain: web application testing and mobile test automation suites, and CodeceptJS support for teams on that framework.