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.

Support for --spec with "cypress open"

See original GitHub issue

Current behavior:

--spec flag only seems to work with the cypress run command.

Desired behavior:

Would be nice to also have this in cypress open command. In case we have several subfolders under integrations folder to distinguish types of tests, and we want to work only on one specific suite. At the moment we can’t use the “Run all tests” since it will run everything.

Versions

Cypress 3.0.1

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:40
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
NickBollescommented, Dec 23, 2019

I’m currently utilizing a separate config file and ignoreTestFiles to implement this. Same can be done with a config parameter though.

NPM scripts

    "cy:open:all": "cypress open",
    "cy:open:e2e": "cypress open --config ignoreTestFiles=!**/*/e2e/**/*",
    "cy:open:unit": "cypress open --config ignoreTestFiles=**/*/e2e/**/*"

I use a separate config file because I want to separate the env vars too. same thing, but move ignoreTestFiles to your config file and use -c config.e2e.json and -c config.unit.json to override the default config.json option

4reactions
Globegittercommented, Oct 23, 2018

We are in the same need for this option. Would be a great addition to have.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Line - Cypress Documentation
--no-exit, Keep Cypress open after tests in a spec file run. --parallel, Run recorded specs ... This can help distinguish groups of specs...
Read more >
Run All Specs in Cypress v10 - Gleb Bahmutov
Click on the "all.cy.js" spec in Cypress and voilà - you got all your specs running together, just like the good old days....
Read more >
Cypress- Test Runner - Tools QA
After you open the Cypress, the Test Runner window will open, which will show the test case “cypressTest1.js”, as shown below. Since in...
Read more >
Cypress 10 - How to run all tests in one go? - Stack Overflow
During cypress open, the ability to "Run all specs" and "Run filtered specs" has been removed. Please leave feedback around the removal of ......
Read more >
Cypress.io - Open Source Cross-Platform End-to-End Test ...
Developers seem to love writing Cypress tests and watching them run. This is mainly because the test runner watched the spec files and...
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