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.

Cannot execute just a spec (or group of them) inside the specs folder

See original GitHub issue

Hi, first of all, thank you for your contribution, this can be very useful for our daily testing activities.

I see a problem, and it is that I cannot find a way to execute just a spec (or group of them) inside the specs folder.

For example, in regular Cypress I’ll do:

"cypress run --spec 'cypress/integration/a.spec.js,cypress/integration/b.spec.js'  --reporter cypr...

But if in cypress-parallel I try to do this, it does not work:

"parTest": "cypress-parallel -s cy:run -t 2 -a '\"--spec 'cypress/integration/a.spec.js,cypress/integration/b.spec.js'\"' ",
"cy:run": "cypress run ",

I also tried other alternatives but I can not find a way to do this. What I am doing wrong? Is it possible to achieve this with current version of cypress-parallel?

Thank you very much in advance!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
pedromateocommented, Dec 16, 2021

Great, I will try and get back! Thanks @stevenmchaves and @isunja for your kind help!

1reaction
isunjacommented, Dec 16, 2021

I see a problem, and it is that I cannot find a way to execute just a spec (or group of them) inside the specs folder. For example, in regular Cypress I’ll do: "cypress run --spec 'cypress/integration/a.spec.js,cypress/integration/b.spec.js' --reporter cypr..

This should be possible using the glob pattern match support: npx cypress-parallel -s cypress run -t 2 -d "cypress/integration/**/{a,b}.spec.js

Full example (-v, verbose):

npx cypress-parallel -s cypress run -t 2 -d  "cypress/integration/**/{a,b}.spec.js" -v
Using pattern cypress/integration/**/{a,b}.spec.js to find test suites
2 test suite(s) found.
Paths to found suites
[
  "cypress/integration/a.spec.js",
  "cypress/integration/b.spec.js"
]
[..]
Running:  a.spec.js
[..]
Running:  b.spec.js

Would result in 2 threads running the two matched specs in parallel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

spec won't find a file in the current directory · Issue #2256
Create a spec file in a subfolder of the main project, like etc/createOrder . Run the spec file with the steps above. Versions....
Read more >
Unable to run tests in a specific location - cypress
I'm attempting to add a script to my package. json file which will specifically run the E2E tests. Can't run because no spec...
Read more >
Solve The User Problem - Gleb Bahmutov
So the user's issue has to do with the folder: in Cypress Desktop GUI the specs are relative to the integration folder, while...
Read more >
all specs in .." from Spec directory Stops Running All Tests in ...
It seems to be an rspec issue. Certain projects only run the specs in the immediate folder instead of traversing to subfolders and...
Read more >
RSpec Tutorial: 7 Ways To Run Specific RSpec Tests.
The most common way to run tests in a project is to run rspec in the terminal. This runs tests for all examples...
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