CI results inconsistent with "local" results #31201
Unanswered
tailesDvSport
asked this question in
CI setup
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have about 50 tests. All of which pass fairly consistently when run "locally". When run locally we are "pointing" the tests to our dedicated test environment. This environment is isolated and so is the data. When running the tests on CI, we are seeing consistent failures. The tests in the CI are pointed at the same environment.
Here is our command to run the tests via Cypress UI:
npx cypress open --env environment=test
Here is our command to run the tests via the build pipeline:
npx cypress run --record --key fakeKey --tag dev-branch,web-test,local-command --env environment=test --browser chrome
This is the environment we're targeting in our cypress.env.js file:

Here is our config:

Example 1:
We're seeing a test fail when the test is triggered from the pipeline because the element simply isn't showing on the page.
Test when triggered by CI pipeline:

Test when triggered by Cypress UI:

We thought this was due to a viewport issue but even when changing the viewport, we are seeing the issue persist and in a real browser the button shows no problem.
Example test:

We use custom commands to keep the working test file more readable.
I'm just looking for any suggestions or help trying to sure up the inconsistencies with the pipeline running the tests.
Beta Was this translation helpful? Give feedback.
All reactions