From the course: End-to-End JavaScript Testing with Cypress.io
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Automatic retrying
From the course: End-to-End JavaScript Testing with Cypress.io
Automatic retrying
- [Instructor] There's a very important aspect of Cypress that we haven't covered yet and that's the concept of automatic retrying. You see, one of the biggest difficulties with end-to-end testing is what are called flaky tests. Flaky tests are tests that past most of the time but occasionally or in certain environments, they fail unexpectedly. Quite often, the flakiness of these tests is really just something like a timing issue, for example, the application might be making some kind of network call that's taking longer than usual and Cypress has a built-in way of avoiding this difficulty, it automatically retries commands and assertions until they pass, this might seem a little confusing at first, so let's take a look at simple example. Let's imagine that our app displays a list of people that it populates from our server, so for the first few fractions of a second, our list will be empty and display a spinner, while our…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.