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.

Why is cypress run different from cypress open with the same browser and the same configuration?

See original GitHub issue

Current 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:

  1. 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
  1. download the npm packages
yarn
  1. start app
yarn start:dev
  1. 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:closed
  • Created 4 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
gkgeorgievcommented, Mar 18, 2021

Unfortunately there are too many of those “misuse” cases, which could speak of design flows, cos a well defined API shouldn’t allow “misuse”.

0reactions
zadiguscommented, Oct 11, 2019

All the tests are green. It was really a misuse of Cypress.

Read more comments on GitHub >

github_iconTop 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 >

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