Why is cypress run different from cypress open with the same browser and the same configuration?
See original GitHub issueCurrent behavior:
cypress open
and cypress run
do not provide the same tests results.
Configuration is the very same, --browser chrome
is used in both cases. Upon running the tests with cypress run
, I really am running the chrome browser, as I do when I run cypress open
.
Desired behavior:
cypress open
and cypress run
provide the same tests results.
Steps to reproduce: (app code and test code)
How to reproduce:
- Clone the repo (don’t worry, it’s small)
git clone --branch setup-build-definition https://github.com/shopozor/consumer-frontend
cd consumer-frontend
git submodule init
git submodule update
- download the npm packages
yarn
- start app
yarn start:dev
- run
cypress run
yarn cypress:integration
Here I have errors.
5. run cypress open
yarn cypress:open
Make sure you select Chrome 77
. Run all the tests. There I have no errors (except one that is normal because I have a test where I expect true to be false).
Versions
Tested on ubuntu 18.04 and Windows 10. Cypress version 3.4.1. Browser: Chrome 77
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Launching Browsers | Cypress Documentation
When you run tests in Cypress, we launch a browser for you. This enables us to: Create a clean, pristine testing environment. Access...
Read more >Command Line - Cypress Documentation
You can add multiple groups to the same run by passing a different name. ... This matches how you run any browser via...
Read more >Key Differences - Cypress Documentation
Most testing tools (like Selenium) operate by running outside of the browser and executing remote commands across the network. Cypress is the exact...
Read more >Cross Browser Testing - Cypress Documentation
Cypress has the capability to run tests across multiple browsers. Currently, Cypress has support for Chrome-family browsers (including Electron and.
Read more >Configuration - Cypress Documentation
Can be configured to apply to cypress run or cypress open separately. ... Whether to enable Chromium-based browser's Web Security for same-origin policy...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Unfortunately there are too many of those “misuse” cases, which could speak of design flows, cos a well defined API shouldn’t allow “misuse”.
All the tests are green. It was really a misuse of Cypress.