0
0
Cypresstesting~5 mins

Cypress CLI execution - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the Cypress CLI used for?
The Cypress CLI is used to run Cypress tests from the command line, allowing automation and integration with other tools.
Click to reveal answer
beginner
How do you open the Cypress Test Runner using the CLI?
Run the command npx cypress open to launch the interactive Cypress Test Runner.
Click to reveal answer
beginner
Which command runs Cypress tests in headless mode?
Use npx cypress run to execute tests in headless mode without opening the Test Runner UI.
Click to reveal answer
intermediate
How can you specify a browser when running Cypress tests via CLI?
Add the --browser flag, for example: npx cypress run --browser chrome to run tests in Chrome.
Click to reveal answer
intermediate
What does the --spec flag do in Cypress CLI?
The --spec flag lets you run specific test files, e.g., npx cypress run --spec 'cypress/e2e/login.cy.js'.
Click to reveal answer
Which command opens the Cypress Test Runner UI?
Anpx cypress run
Bnpx cypress open
Ccypress start
Dcypress test
How do you run Cypress tests without the UI?
Anpx cypress open
Bnpx cypress test
Cnpx cypress run
Dnpx cypress start
What flag specifies which browser to use in Cypress CLI?
A--browser
B--spec
C--headless
D--env
How do you run only a specific test file in Cypress CLI?
A--file
B--only
C--test
D--spec
What does running npx cypress run do?
ARuns tests in headless mode
BRuns tests with UI
COpens Cypress dashboard
DStarts Cypress server
Explain how to run Cypress tests from the command line including how to specify a browser and a test file.
Think about the main CLI command and useful flags.
You got /3 concepts.
    Describe the difference between npx cypress open and npx cypress run.
    Consider UI vs headless execution.
    You got /3 concepts.