question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cy.run --headed --no-exit. Exits the browser after each spec.

See original GitHub issue

Current behavior

Trying out Cypress run with the headed and no exit option, but after each test, it still exits the test runner.

Desired behavior

With the --headed --no-exit flag I expect the test runner to not close

Test code to reproduce

I tried this with a fresh cypress installation. And ran the run command with one of the example specs included when you install Cypress.

npx cypress run --headed --no-exit --spec "cypress/integration/1-getting-started/todo.spec.js"

Cypress Version

9.2.0

Other

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ScriptyChriscommented, Dec 29, 2021

I noticed that the problem does not occur on version 9.1.1. @scarsam could you try to downgrade your Cypress and check if older version will also work for you?

1reaction
scarsamcommented, Jan 4, 2022

Thanks, @ScriptyChris and @ejdaly. Downgrading to 9.1.1 works for me now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Line - Cypress Documentation
To prevent Cypress from exiting after running tests in a spec file, use --no-exit . You can pass --headed --no-exit in order to...
Read more >
Cypress tests passes with `cypress open`, but fails with ...
They pass all the time if I start them with cypress open. But if I use this command: cypress run --browser chrome --headed...
Read more >
Command Line - cypress - w3resource
In this tutorial you will learn how to run Cypress from the command line, we will show you how to specify the spec...
Read more >
9 How To Run Cypress Tests in From Command Line - YouTube
In this video, I will show you how to run cypress using CLI commands. ... Command Line | Cypress Test Headed Mode |...
Read more >
Cypress run Command - ProgramsBuzz
cypress run --no-exit: This option prevents the cypress test runner from exiting after running tests in a spec file. cypress run --project -path ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found