question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cypress open and cypress run result is not same

See original GitHub issue

Current behavior

When i use cypress open and run all test cases, all cases passed.

image

But if i use cypress run, some of it will not pass.

image

test with cypress open, everything is ok

image

image

Desired behavior

cypress open and cypress run command get the same test result.

Test code to reproduce

Clone code

git clone https://github.com/DouyinFE/semi-design
yarn bootstrap
yarn start

Cypress open

yarn test:cy

Cypress run

./node_modules/.bin/cypress run

Cypress Version

9.5.2

Other

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
CaiqueCoelhocommented, Apr 4, 2022

@shijiatongxue I think this is not necessarily a problem. Because with Cypress open I saw you are running the tests with Chrome browser, but with Cypress run the default is Electron. Can you send us what is the error message you are getting in these failed tests using cypress run?

0reactions
davidmunechikacommented, Apr 26, 2022

Sorry for the delayed response! If possible, I would suggest narrowing down the variables involved here so that we can clearly focus on what is causing the issue. This would help us out a lot.

  • Narrow it down to a single failing simple test case
  • Remove as much extra config as possible while still having the test failures discrepancies.

After that I would compare the Test Runner command log within each run to see if there is some timing variability between the 2 runs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Line - Cypress Documentation
By default, Cypress will run tests headlessly during cypress run . Passing --headed will force the browser to be shown. This matches how...
Read more >
Cypress tests passes with `cypress open`, but fails with ...
They pass all the time if I start them with cypress open. But if I use this command: cypress run --browser chrome --headed...
Read more >
Run All Specs in Cypress v10 - Gleb Bahmutov
js file if we are running using the cypress open or cypress run mode. Update 1: skip the all.cy.js spec when using the...
Read more >
cypress-io/cypress - Gitter
If I run npx cypress open Cypress finish all tests some tests are failing but it finishes. ... "message": "Could not find Cypress...
Read more >
Cypress — initial setup - Kristijan - Medium
npm install cypress. At the moment of writing, current version of Cypress is 4.0. · cypress open. Headless: · cypress run · cypress...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found