Reputation:
Is it possible to run a Cypress test without using the GUI where you can choose the test file. Currently I open it this way:
I type in CMD: node_modules/.bin/cypress open
and then the GUI pops up where I can choose my test.
Is there a command which avoids that the GUI is popping up and what is the command?
Upvotes: 2
Views: 10310
Reputation: 1110
You can run with command line in headed like this:
node_modules\\.bin\\cypress run --headed
this will run the tests by default in Electron browser.
And headless:
node_modules\\.bin\\cypress run
Upvotes: 2
Reputation: 830
Yes, it is cypress run
. It is all described in the documentation.
To run a specific file, you need to pass --spec
argument, like this:
node_modules/.bin/cypress run --spec "cypress/integration/nameOfTheTest.js"
Upvotes: 0