Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Currently there exists no way to run a suite of spec files in Cypress #263

Closed
adokania opened this issue Oct 12, 2016 · 15 comments
Closed
Assignees
Labels
cli type: feature New feature that does not currently exist
Milestone

Comments

@adokania
Copy link

Mocha has a --grep option that takes in a pattern and runs all spec files that match it. I would like cypress to support this feature as there are times where i want to group together a few spec files in my CI build but not run all the spec files at once.

The --spec option allows you to run a single spec file but not a combination.

@jennifer-shehane jennifer-shehane added the type: feature New feature that does not currently exist label Oct 13, 2016
@adokania
Copy link
Author

adokania commented Oct 21, 2016

Is there any update/ETA on this feature? Should be an easy addition. Mocha already supports this feature, its just a matter of exposing it through cypress.

@brian-mann
Copy link
Member

No updates yet - although mocha supports this out of the box (for node processes), Cypress runs in the browser, and we'll have to specifically code an integration for this to work well.

For instance, this flag makes sense when running all of the tests once, but it doesn't work so well when working in the GUI mode.

If you were to cypress open --grep foobar, we could initially run the GUI tests with that grep, but then how do you "remove" this grep option? Internally when you use .only that will actually obliterate any passed in --grep flag.

What if both an .only and --grep flag was passed?

@adokania
Copy link
Author

adokania commented Nov 1, 2016

I understand that it can get tricky to support this in the browser but maybe that use-case is not as important.

I think the use case of this flag is mostly when used to run the tests through the command line (atleast in my scenario) where I want to batch together specific test files when running on CI or locally using the cypress run --grep foobar command. Maybe this command like the '--reporter' flag can be supported only when running through command line?

@brian-mann
Copy link
Member

Okay thats a good point, adding this specifically for the CLI would be much easier.

@adokania
Copy link
Author

Any updates, if this is easy can we pls have it in the next release. Will help us quite a bit.

@adokania
Copy link
Author

Hello, is this feature now available to use?

@brian-mann
Copy link
Member

Nope. When its ready this issue will be closed and you'll see it in the changelog. Unfortunately there are higher priority features / bugs we're working on. You can look at our projects roadmap for 0.18.x work too and see the issues we're dealing with.

In January we'll have more bandwidth as some of the bigger projects we're working on will be done.

We are working towards an open source release which will make it possible to accept community contributions.

@jennifer-shehane
Copy link
Member

Closing as duplicate of #681 - this should be released soon.

@brian-mann
Copy link
Member

Fixed by PR #1583

@bmanuel
Copy link

bmanuel commented Apr 15, 2018

@brian-mann is there any documentation on how to go about running individual suites?

@brian-mann
Copy link
Member

@bmanuel what do you mean individual suites?

@jessejoe
Copy link

jessejoe commented May 8, 2018

@brian-mann I think @bmanuel was asking for documentation on how to run multiple spec files, since you commented that this issue was fixed in #1583, but the PR doesn't have much detail.

@bmanuel
Copy link

bmanuel commented May 8, 2018

@brian-mann, @jessejoe nailed it. Sorry, I forgot to respond right away with that.

@jennifer-shehane
Copy link
Member

The code for this is done and sitting in our develop branch, but this has yet to be released. We'll update this issue and reference the changelog when it's released.

@jennifer-shehane jennifer-shehane added stage: pending release and removed stage: pending release stage: investigating Someone from Cypress is looking into this stage: needs investigating Someone from Cypress needs to look at this stage: ready for work The issue is reproducible and in scope labels May 24, 2018
@brian-mann
Copy link
Member

Released in 3.0.0.

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Dec 7, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
cli type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

5 participants