Bird
0
0

What will happen if you run npx cypress run --headless in your terminal?

medium📝 Predict Output Q13 of 15
Cypress - CI/CD and Reporting
What will happen if you run npx cypress run --headless in your terminal?
ACypress opens the browser window and runs tests interactively
BTests run in the background without showing the browser UI
CTests fail because --headless is not a valid option
DCypress opens a GUI to select tests manually
Step-by-Step Solution
Solution:
  1. Step 1: Understand the effect of --headless flag

    The --headless flag runs tests without opening the browser window, so tests run in the background.
  2. Step 2: Match options with expected behavior

    Cypress opens the browser window and runs tests interactively and D describe interactive modes, which do not happen with --headless. Tests fail because --headless is not a valid option is incorrect because --headless is valid.
  3. Final Answer:

    Tests run in the background without showing the browser UI -> Option B
  4. Quick Check:

    --headless = background test run [OK]
Quick Trick: Headless runs tests silently without UI [OK]
Common Mistakes:
  • Expecting browser window to open
  • Thinking --headless is invalid
  • Confusing headless with interactive mode

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Cypress Quizzes