Cypress Retry on Failed Tests
Narayan Palani · Auerbach Publications eBooks · 2021
When a particular group of tests gets failed during automation test execution, engineers tend to rerun those failed tests to understand the nature of those failures. This is to eliminate flaky tests, which fail frequently as compared to the genuine failure due to application bugs. This has been simplified by Cypress with the help of retries. Cypress-plugin-retries have been used until the version 4 of Cypress, but this has been deprecated and Cypressio v5 onwards supports this with optional retry configurations to help rerunning the failed tests. When I started using the earlier versions of Cypress, ‘number only fields’ (fields that allow only numeric values) failed to type numbers in the first iteration of the tests. If I reran the test, it worked absolutely fine and numbers got entered through type command.