Sharing our challenges, mistakes, hacks, successes, opinions and news
Posts marked with tag flake
Live Webcast | Flaky Test Management with Cypress
Register Tired of battling flaky tests? Join us Wednesday, May 19th at 2:00pm EDT/11:00am PDT to find out how to focus your efforts with test-writing best practices, how to understand different types of flake, and the many ways in which Cypress can help you eliminate flake for good. Your Webcast HoRead more
When Can The Test Blink?
Let's take a page where a loading element is displayed while the application is fetching the data from the server. If the test is observing the loading element to make sure it disappears, can the loading be too fast? Can the test runner "blink" and miss the element? Yes, it can. In this blog post IRead more
Retry, Rerun, Repeat
If at first you don't succeed, then dust yourself off and try again. - American R&B singer Aaliyah (1979-2001) The modern Internet is built on retries. Software and hardware failures are normal and expected. EveRead more
When Can the Test Submit a Form?
In this blog post we continue exploring flaky tests and how to fix them. We will look at the situation when a page submits a form and then continues to interact with the page, which causes a problem. Tip: you can find all existing similar posts under the tag Flake. You can find the source code for tRead more
Introducing Flaky Test Detection & Alerts
Practically everyone that has dealt with testing web applications has been confronted with flaky tests. These are the tests that can fail, but pass once retried and without any code changes. It's one of the most challenging obstacles with testing, and tremendous engineering effort can be invested (aRead more
Debug a Flaky Visual Regression Test
In our Cypress RealWorld App we are using visual regression testing to catch unintended style and layout changes. We are using the Percy.io service, and you can see the screenshots at https://percy.io/cypress-io/cypress-realworld-app. During tests, we periodically take image snapshots using cy.percyRead more
When Can The Test Navigate?
No one likes flaky tests, not even their mama. In this blog post I will show a test that appears simple, yet acts in surprisingly annoying and frustrating ways. We will slightly change the test to make it reliable and flake-free. We will apply the following three principles to the test refactoring tRead more
Do Not Get Too Detached
When the Cypress Test Runner runs through the test's steps, the application can update itself, causing problems. Often a very frustrating problem our users encounter simply says cy... failed because the element has been detached from the DOM. You can see this error below and its explanation using thRead more
When Can The Test Log Out?
Recently, we released the Cypress Real World App - a modern web application with a full set of E2E and API tests showing the recommended best practices for writing tests. From the start, we had Linux continuous integration running tests on every commit. After the release, we added a Windows continuoRead more
Working with Select elements and Select2 widgets in Cypress
This blog post shows how to control native HTML elements from Cypress tests. We will also look at how to work with a very popular wrapper library called Select2, that supplants the native elements with an additional HTML markup. Note: you can find the source code for this post in the recipe "SelectRead more
When Can The Test Stop?
Imagine a small web page application that shows a window Confirm popup when the user clicks a button. The HTML might look like this Assertion counting Click on the button, should show Window confirm dialog Click The application works. Window Confirm application We can write a test to confirm (punRead more
When Can The Test Click?
Recently a user opened a Cypress issue #3135 asking why the cy.click() command was behaving differently than the way click behaved when a user clicks on the button. We’ve seen many people ask similar questions involving click and wanted to address how to ensure your tests behave the same way as a usRead more
When Can The Test Start?
Can the test runner be too quick? Can the tests start before the application is ready to handle the test steps? It definitely can happen. This blog post shows a little trick one can use to detect when a web application really starts, so that the test runner never has to wait longer than necessary. ARead more