Comments (14)
Hey @PBIIBP . I'm having the same problem and actually even if I create the empty runner-results
folder in the project's root dir, it's being deleted and then this error occurs.
Did you managed to overcome this issue somehow?
from cypress-parallel.
I have this somewhat similar issue. Unfortunately i cannot share the repo is a customer project, but i run the build without parallel it works all fine on jenkins but everytime i try it out with parallel i get this error.
node:fs:1405
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, scandir '/home/jenkins/slave/workspace/some-project-folder/runner-results'
at Object.readdirSync (node:fs:1405:3)
at collectResults (/home/jenkins/slave/workspace/some-project-folder/node_modules/cypress-parallel/utility.js:35:26)
at start (/home/jenkins/slave/workspace/some-project-folder/node_modules/cypress-parallel/cli.js:32:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
this started to happen after cypress 10 upgrade, but works well with cypress 9
from cypress-parallel.
changing the cleanResultsPath method in node_modules/cypress-parallel/cli.js to the following did the trick for me:
function cleanResultsPath() { if(!fs.existsSync(resultsPath)) { fs.mkdirSync(resultsPath, { recursive: true }) } else { fs.readdir(resultsPath, (err, files) => { if (err) console.log(err); for (const file of files) { fs.unlink(path.join('path here', file), err => { if (err) console.log(err); }); } }); } }
from cypress-parallel.
I understood the problem now. it is getting failed because :
When none of the test case has got executed then report folder will not get created by 'json-stream.reporter', Hence you are getting this error.
Command which you are using looks not correct to me. Please use something like this '"node_modules/.bin/cypress-parallel -s dev -t 2-d '**/user.spec.ts'.
Note: json-stream.reporter will create report folder 'runner-result' only when a test case gets executed.
from cypress-parallel.
@PBIIBP May be issue is with your cypress-report-config.json file. Can you share the json file ?
from cypress-parallel.
I encountered the same issue with version cypress-parallel 0.9.0 and cypress 9.4.1
project structure: project/cypress/integration/folder/test.spec.ts
command: npx cypress-parallel -s dev -t 2 -d **/user.spec.ts
OS: Windows 10 / powershell
Would be great if you can have a look @ISanjeevKumar
node:fs:1390
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, scandir 'C:\Users\user\dev\project\runner-results'
at Object.readdirSync (node:fs:1390:3)
at collectResults (C:\Users\user\dev\project\node_modules\cypress-parallel\utility.js:35:26)
at start (C:\Users\user\dev\project\node_modules\cypress-parallel\cli.js:32:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errno: -4058,
syscall: 'scandir',
code: 'ENOENT',
path: 'C:\Users\user\dev\project\runner-results'
}
from cypress-parallel.
HI @ISanjeevKumar, sorry for the late response to your suggestion.
When none of the test case has got executed then report folder will not get created by 'json-stream.reporter', Hence you are getting this error.
I can confirm if none test cases are found this error will occour. In our case tests where executed but still the error will occour.
Command which you are using looks not correct to me. Please use something like this '"node_modules/.bin/cypress-parallel -s dev -t 2-d '**/user.spec.ts'.
This is exactly what npx does from my understanding. https://www.npmjs.com/package/npx
I also double checked and with both execution ways the error occours.
from cypress-parallel.
I did some investigation today and can give the following result in return which lead to the error in our case.
- cypress-extends plugin in combination with our own cypress-multi-reporters configuration seems to colidate.
from cypress.json:
"reporter": "cypress-multi-reporters", "reporterOptions": { "configFile": "reporter-config.json" },
from cypress-env-dev.json:
"extends": "./cypress.json", ...
from reporter-config.json:
"reporterEnabled": "mochawesome, mocha-junit-reporter", "mochawesomeReporterOptions": { "reportDir": "cypress/reports/mochawesome/json", "reportFilename": "spec", "overwrite": false, "html": false }, "mochaJunitReporterReporterOptions": { "mochaFile": "cypress/reports/mocha-junit-reporter/spec_[hash].xml", "includePending": true, "jenkinsMode": true }
plugins/index.js
module.exports = (on, config) => { return require('@bahmutov/cypress-extends')(config.configFile); }
solution 1: as soon as the cypress-extends plugin is disabled in plugins/index.js and config files will not be merged. Additionally I have to configure the cypress-multi-reporters via cli. the configuration for cypress-multi-reporters from cypress-env-dev.json seems to be ignored.
-r cypress-multi-reporters -o 'configFile=reporter-config.json
solution 2: delete your own cypress-multi-reporters config from cypress.json and it will also work like expected.
My question here is if it is intended that cypress-multi-reporters config from cypress.json will be ignored by default? Its at least not documented.
from cypress-parallel.
@nils-hoyer nils-hoyer
you only copy'n'pasted the runner config to a new file?
{ "reporterOptions": { "mochaFile": "tests/junitresults_integration-[hash].xml", "toConsole": true, "attachments": true } }
i tried but no luck. thats the script in package.json:
cypress-parallel -s cy:run -t 2 -d cypress/e2e/one/* -a '\"--browser electron --headed --reporter junit --config video=false\"' -r cypress-multi-reporters -o 'configFile=reporter-config.json
from cypress-parallel.
yes, I addressed the reporter-config.json from the cypress-parallel cli. two suggestions: make sure, you are not using cypress-extends plugin and not refer to report-config file from cypress config.
from cypress-parallel.
Sorry, doesn't seems to work for me. Even if I remove the reporter config complete.
ENOENT: no such file or directory, scandir ClientApp\node_modules\cypress-parallel\utility.js:35:26)
from cypress-parallel.
if you upload an example repo reproducing the error I can have a quick look on it.
from cypress-parallel.
I am facing the same problem
from cypress-parallel.
Same problem. Will check up on the PR linked above.
from cypress-parallel.
Related Issues (20)
- cypress-parallel can't use on Cypress 11
- Question: Parallel runs and slack notifications.
- Found 'path here' instead of resultsPath in cli HOT 2
- "-a" option: removing the escaped quotes HOT 4
- Spec files are not being split in different threads HOT 5
- Question : Does mochawesome .json not come for parallel runs facing issue , getting an issue in after events (facing this issue in 0.11.0) HOT 1
- Cannot exclude tests with Cypress command arguments (-a)
- Ability to list multiple directories to run HOT 1
- Error at installing because the [email protected] doesn't exists HOT 1
- Support yargs "stop parsing" instead of args flag
- How do I pass environment variable as arguments in command line HOT 4
- Is colors.js still an issue for this repo for anyone else? HOT 2
- There is not enough documentation on how to generate and combine reports with multireporters HOT 1
- TypeError: glob is not a function HOT 1
- Update `mocha` to v10.1.0
- Can we pass unique arguments to each thread? HOT 1
- Retries do not work when using cypress-paralllel HOT 2
- When we have cy-grep implemented to select specific tests, running it via cypress-parallel leads to failure while building report (causing buildkite build to fail)
- Unable to see complete spec name in result table HOT 1
- need to run specific test specs on respective thread. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress-parallel.