Cypress not launching chrome browser after "npx cypress run --browser chrome" command

Viewed 919

I want to run tests serially (one after another) for that I used command npx cypress run --browser chrome but it is running headless in terminal I see this

From what I see in Udmey videos while I was learning it executes all the tests or .js files one after another in chrome browser

I'm currently using "cypress": "^9.5.1",

terminal 1

I tried with full path as well

npx cypress run --browser C:\Program/Files\Google\Chrome\Application\chrome.exe

I give me

terminal 2

I tried with full path as well

npx cypress open --browser chrome

It just open the Cypress window with test names to select.

Is there a way to run all the tests one after another automatically with chrome browser open. Sorry for if use bad english grammar

1 Answers

With npx cypress open you get a button to run all tests.

Make sure you have the Chrome browser selected (above the "Run 38 integration specs" button)

enter image description here


You should also understand that npx cypress run --browser chrome is also running all the test in chrome.

Headless means you don't see the browser, only messages in the terminal. But Cypress tests always run in the browser.

Related