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.

--no-exit flag causes Cypress to hang after first file in multiple file run

See original GitHub issue

Current behavior:

If cypress run is invoked with the --no-exit flag and the pattern to find specs matches multiple files, cypress will only run the first file and then hang with the message not exiting due to options.exit being false

Desired behavior:

Cypress should run all the matched files before ending the run and not exiting

Steps to reproduce:

Clone https://github.com/cdanielsen/cypress-test-tiny git checkout bug/no-exit-flag-prevents-multiple-file-run npm run test:noexit

Versions

Cypress: 3.0.2 OS: Ubuntu 18 Browser: Chromium

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
kucebcommented, Jul 25, 2018

@cdanielsen I think you should use the Module API. I’d create a script that requires Cypress and then you can do whatever you want after Cypress exits.

https://on.cypress.io/module-api

1reaction
kucebcommented, Jul 20, 2018

@cdanielsen Hi, Can you explain your use case for this? I’m just curious, because the --no-exit was added to allow users to debug a --headed run by allowing you to keep the browser open.

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 >
How To Use Cypress CLI Commands - Learn Automation
We can execute Cypress Test using Cypress CLI Commands and with different flag we can execute test in different ways.
Read more >
How can I get Cypress to run a specific folder of tests by ...
Cypress was running only the first test file and stoppeded. I've tried all ... *-spec.js etc and the problem was with the --no-exit...
Read more >
Moon - A cross browser Selenium, Cypress, Playwright and ...
Selenium Grid 4.x is using a key-value storage (e.g. Redis) for the same purpose. If for some reason process that stores sessions list...
Read more >
Mocha - the fun, simple, flexible JavaScript test framework
--bail, -b. Causes Mocha to stop running tests after the first test failure it encounters. Corresponding “after each” and “after all” hooks are...
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