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.

cypress run --spec cypress/integration/APP/**/* runs all tests instead of just subfolder APP tests

See original GitHub issue

Is this a Feature or Bug?

Bug

Current behavior:

I have two subfolders in my integration folder: cypress/integration/APP/ cypress/integration/API/

When I run

cypress run --spec cypress/integration/APP/**/*

ALL tests run, but I expected that only tests in the APP subfolder would run. Is this a bug or intended behaviour? Doesn’t the --spec flag support globs?

Desired behavior:

Just run tests in cypress/integration/APP/ subfolder The --spec feature would be really useful if I could run all tests in different subfolders so I could manually distribute tests across machines.

Steps to reproduce:

cypress run --spec cypress/integration/SUBFOLDER/**/*

Versions

cypress 3.0.1 on Mac OS 10.13.4

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
brian-manncommented, Jun 4, 2018

@silversteez @maximilianschmid try adding single quotes around the spec glob or use an equals sign…

cypress run --spec 'cypress/integration/test/**/*'
cypress run --spec=cypress/integration/test/**/*
2reactions
jennifer-shehanecommented, May 31, 2018

You should see new output we added in 3.0 that specifies Specs and Searched

Specs being the specs that will be run Searched being what Cypress used to search for the specs

screen shot 2018-05-31 at 12 37 13 pm

What is printed in these fields in the console output?

You can run different subfolders by passing multiple globs to the spec argument like:

cypress run --spec cypress/integration/APP/**/*,cypress/integration/API/**/*
Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing and Organizing Tests - Cypress Documentation
What you'll learn How to organize your test and support files. What languages are supported in your test files. How Cypress handles unit...
Read more >
node.js - How can I give path to a particular folder and just run ...
There are a couple of suggestions here cypress run --spec cypress/integration/APP/**/* runs all tests instead of just subfolder APP tests.
Read more >
Run All Specs in Cypress v10 - Gleb Bahmutov
This blog post explains my workaround for running all specs together (or some specs only). Video: if you would rather watch the explanation, ......
Read more >
Skip test conditionally with Cypress - Filip Hric
You can use them with multiple tests in a single spec, so that you'll run only those test that you want. This code...
Read more >
Great E2E testing with Cypress
Cypress offers a great test runner, that's not flaky, for running Unit as well as E2E tests, the future is here. # Installing...
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