课程: End-to-End JavaScript Testing with Cypress.io
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Automatic retries
- [Instructor] All right, at this point, we've covered quite a few concepts in Cypress, but there's still one very important aspect that we haven't covered yet and that is the concept of automatic retrying. You see, one of the biggest difficulties with end-to-end testing is what are called flaky tests. Now, flaky tests are just tests that pass most of the time, but occasionally, or in certain environments, they will fail unexpectedly. Now, quite often the cause of these flaky tests is just some sort of timing issue. So, for example, the application might be making some network call that's taking longer than usual. And Cypress has a built-in way of avoiding this difficulty, which is that it will automatically retry commands and assertions if they fail until they pass. Now, that might sound a little bit confusing at first, so let's just think about a simple example. Let's imagine that our app displays a list of people that it populates from the server. Now, loading the information for…
内容
-
-
-
-
-
(已锁定)
Interacting with elements6 分钟 6 秒
-
(已锁定)
Triggering other actions8 分钟 46 秒
-
(已锁定)
Common assertions8 分钟 46 秒
-
(已锁定)
Automatic retries3 分钟 21 秒
-
(已锁定)
Debugging Cypress tests5 分钟 41 秒
-
(已锁定)
Setting environment variables6 分钟 10 秒
-
(已锁定)
Working with test doubles4 分钟 34 秒
-
(已锁定)
Challenge 2: Writing your own tests1 分钟 20 秒
-
(已锁定)
Solution 2: Writing your own tests3 分钟 29 秒
-
(已锁定)
-
-