Use the following commands to run your Cypress tests based on your needs:
npx cypress run
Note: Runs all tests in headless mode using the Electron browser.
npx cypress run --spec cypress\e2e\demo_file.cy.js
Note: Replace the path with your spec file’s relative path.
npx cypress run --spec cypress\e2e\demo_file.cy.js --browser electron
Note: Available browsers:
chrome
,electron
,firefox
,edge
npx cypress run --headed
Note:
--headed
opens the browser instead of running in the terminal.
npx cypress run --headed --spec cypress\e2e\demo_file.cy.js --browser edge