Cypress retries and flakyness #20486
Unanswered
clementoriol
asked this question in
Questions and Help
Replies: 2 comments
-
You'll have to dig deeper into the element that is consistently failing. It helps to use more assertions. This video goes into good detail about ways to avoid |
Beta Was this translation helpful? Give feedback.
0 replies
-
Also check out https://www.youtube.com/watch?v=deNl1q1el0E&t=172s. There is also cy.CDP, the shotgun. https://github.com/muratkeremozcan/fastify-example-tests/blob/main/cypress/integration/bonus11.js |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
While working on making my tests less flaky and avoiding the dreaded "element is detached from the DOM", I realized that usually when I'm having flakyness issues, retry won't usually help.
Let's say I've got a test assertion failing 1% of the time because of a "element is detached from DOM" issue, if the runner retries 3 times, every of the 3 retries will fail on the same error.
This confuses me a lot because I can't explain why it happens, and thought retry could be an appropriate (even if not perfect) solution for flakyness.
Did anyone experienced this too ?
Beta Was this translation helpful? Give feedback.
All reactions