Consistent Results

Find out how Cypress fights against flaky tests and how it makes our tests deterministic.

If you have ever worked with end-to-end tests before, you will know that they are prone to produce false negatives. This means your tests will fail because of external forces that are outside of your control.


Common causes of flaky tests

In this section, we will look at the top five causes of flaky tests, and how Cypress battles these to make our test suite more deterministic.

Half-loaded pages

One of the most common causes of flaky tests is a half-loaded application state. Your app is still waiting to be fully ready to be interactive, but your test suite already tries to verify test cases without waiting for the load event to finish.

In the case of dynamic content, things are even more pronounced. This can cause the test suite to interact ...