Skip to content

Fix a failing test

Before a failure reaches you, the healer has already had a go. It read the trace, worked out what changed, and tried to patch the script. Most failures caused by the app drifting — a moved button, a renamed field — never land on your desk. See Healing and hints.

So if you’re looking at a failed test, the healer either couldn’t fix it, or healing was turned off for the run.

Open the failed test in the run report. The healer’s attempt log shows what it tried and why it stopped. That usually tells you which of two situations you’re in:

  • A real bug. The app genuinely broke. The test is doing its job — the fix belongs in the app, not the test.
  • A test that needs to catch up. The app changed on purpose, and the test is now testing the old behavior.

When the test itself needs a change:

  1. Edit the test script. Fastest. Your edit becomes the test’s current version — the next run uses it, and if the test later fails the healer fixes your version rather than throwing the edit away. Every edit is saved, so you can compare versions or roll back any time.
  2. Regenerate the test. Re-run planning and generation to rebuild the test against the current app.
  3. Add a hint. The hint guides future generation, so the same breakage doesn’t come back the next time this — or another — test is generated.

Rule of thumb: fix this test now → edit the script. Rebuild it because the app changed a lot → regenerate. Stop a cause from recurring across tests → add a hint.

  • Selector drift — an element moved or got renamed. The healer usually catches this; a hint prevents it next time.
  • Timing — the test checked something before the app was ready. A hint like “wait for the spinner to clear” fixes it for good.
  • A popup in the way — a cookie banner or modal intercepts a click. Tell OttoTester about it with a hint.
  • A real regression — the test is right and the app is wrong. Don’t “fix” the test — fix the app.