Skip to content

Help centerTroubleshooting

Why does my test pass only half the time?

Usually: data that changes, a page that’s too slow, a borderline check, or a pop-up that only shows on some visits.

Updated Text versionOpen inChatGPT (new tab)Claude (new tab)Perplexity (new tab)

A Qanary test that passes, then fails, with nothing changed, is a flaky test. Steps are replayed without AI, always the same way: if the result varies, it’s almost always because something varies on the site, or because a check is borderline. The screenshots in the results show the cause.

How do I find the cause?

  1. Open “Results” and find the test that switches between “Passed” and “Failed.”
  2. Open a failed result and look at the screenshot of the red step, and of the step before it.
  3. Open a passed result of the same test, at the same steps.
  4. Look for what differs between the screenshots: a page, a message, a product, a window on top.

Expected result: you see what changes from one run to the next.

Data that changes

The symptom: the test fails on a product, a price, a promo code, or an account. The cause: the test data isn’t stable. Stock that comes and goes, a promo code with a usage limit, a test account changed by someone else. Qanary always replays the product it recorded: it doesn’t pick another one.

What to do: use long-lasting data set aside for testing: a product that’s always in stock, a promo code with no limit, a test customer account nobody else touches.

A page that’s too slow

The symptom: in the failed screenshot, the page is still loading. The cause: your site responds more slowly at certain times (a traffic peak, a nightly backup, a slow third-party service).

What Qanary waits for, at each step:

  • up to 10 seconds for an element to be present and clickable;
  • up to 10 seconds for a page to load after an action;
  • up to 30 seconds for a URL to respond, with 3 attempts.

Qanary doesn’t retry a click or an input that failed, and doesn’t rerun a failed test. Slowness beyond these limits may be a real performance problem that your customers face too: note the time of the failures and pass it on to your tech team.

A borderline check

The symptom: the red step is a check, and the screenshot looks right. The cause: the sentence leaves room for interpretation. On every run, the AI must be at least 90% sure; otherwise, the check is marked unverified and counts as a failure. A check saved with the warning “Assertion saved, but it could be unstable” is the first suspect.

What to do: rewrite the check with the exact words shown on screen, one idea per sentence. See How do I write a check that works?.

A pop-up that only shows on some visits

The symptom: the failed screenshot shows a window on top of the page (a discount, a newsletter, a survey) or a cookie banner that showed up late. Qanary doesn’t close these windows on its own: a window that only appears during the run can block the next step. See How does Qanary handle cookie banners, pop-ups, A/B tests?.

A bot protection

The symptom: the screenshot shows a captcha, an “Access Denied” page, or a verification page, but not every time. See My site or firewall blocks Qanary: what do I do?.

While you wait for the fix

To stop the flaky test from sending alerts while you investigate, turn it off (“Enabled”). It stays in the project and you can still run it manually, but the plan skips it. Turn it back on once the cause is fixed.

If it doesn’t work

No visible difference between the screenshots? Send the links to both results to contact@qanary.dev: we’ll compare them with you.

Frequently asked questions

Should I record the test again?

Rarely. Find the cause first: a test recorded again with the same unstable data will be just as flaky.

Can a flaky test hide a real bug?

Yes. A bug that happens half the time is still a bug, and your customers hit it half the time too. Look at the screenshots before you call it a false alarm.

Still have a question? Julia or Antoine will reply within 24 business hours at contact@qanary.dev. A human, not a bot. The canary stays down the mine.

For your AI assistant: this article as text, the help center index, the glossary.

Take 30 minutes to try Qanary on your own site.

Bugs only. Promise.