Docs » Troubleshoot broken tests

Troubleshoot broken tests 🔗

There are a number of reasons why your tests might fail like issues with test validation or application unresponsiveness. For example,

  • API endpoint was unreachable

  • URL was unreachable

  • UI element wasn’t found

  • Default wait time of 10 seconds is too short for step assertions to complete. A test might fail because it takes longer than 10 seconds for a website to load.

Troubleshoot test validation 🔗

Follow these guidelines to troubleshoot a broken test.

  1. (Optional) Make a copy of the test so that you can check various solutions before fixing the original test.

  2. Open the test page and see when the test started to fail. Consider the following questions:

    • When did the check fail? Is there a pattern among other failed runs?

    • Does the check fail consistently on the same step, or intermittently?

    • Is this the first time the check has failed on this step? Did you make a recent change to the test?

    • Was the failure tied to a specific location or across all locations?

  3. Open the run results view of a failed test, find the step that is failing and go to the link.

  4. Open inspect element.

  5. Duplicate the step and repeat the steps in your test until you find the broken step.

  6. Verify that there is one instance only of the selector you want to use in your test. If the selector appears more than once your test might break again in the future. Unique selectors provide optimal test performance.

  7. Update your tests with your findings.

This page was last updated on Jul 02, 2024.