You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 24, 2021. It is now read-only.
In our case: we request some test data in a before() block using cy.request(), then use that data in our tests. If the request to get the data fails the test is guaranteed to fail so it should not execute. When we use the retries plugin the test does execute, then shows the error that occurs because we don't have the test data. The actual error causing this is that the service we were reaching out to returned a 404 but the error shown in the test report is that cypress timed out trying to find an element that didn't exist.
This masks the real issue that causes a test failure and makes debugging failures in CI very difficult.
Expected: If a failure in the before() or beforeEach() block happens, the test shouldn't be ran, regardless of the number of retries.
Actual: If the value of the RETRIES environment variable is greater than zero, even if a failure occurs in a before() or beforeEach() block, the test will be run. This causes the error shown in the test results to be inaccurate.
Here is a screenshot of what this looks like after it is ran:
The text was updated successfully, but these errors were encountered:
In our case: we request some test data in a
before()
block usingcy.request()
, then use that data in our tests. If the request to get the data fails the test is guaranteed to fail so it should not execute. When we use the retries plugin the test does execute, then shows the error that occurs because we don't have the test data. The actual error causing this is that the service we were reaching out to returned a 404 but the error shown in the test report is that cypress timed out trying to find an element that didn't exist.This masks the real issue that causes a test failure and makes debugging failures in CI very difficult.
To repro this issue, run the spec from the branch in my fork of this repo: https://github.com/drewbrend/cypress-plugin-retries/blob/patch-1/cypress/integration/spec.js
Expected: If a failure in the
before()
orbeforeEach()
block happens, the test shouldn't be ran, regardless of the number of retries.Actual: If the value of the
RETRIES
environment variable is greater than zero, even if a failure occurs in abefore()
orbeforeEach()
block, the test will be run. This causes the error shown in the test results to be inaccurate.Here is a screenshot of what this looks like after it is ran:
The text was updated successfully, but these errors were encountered: