Giter Site home page Giter Site logo

Comments (14)

nikodamnCH avatar nikodamnCH commented on May 18, 2024 4

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.

turso avatar turso commented on May 18, 2024 2

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.

kronwalled avatar kronwalled commented on May 18, 2024 1

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.

ISanjeevKumar avatar ISanjeevKumar commented on May 18, 2024 1

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.

ISanjeevKumar avatar ISanjeevKumar commented on May 18, 2024

@PBIIBP May be issue is with your cypress-report-config.json file. Can you share the json file ?

from cypress-parallel.

nils-hoyer avatar nils-hoyer commented on May 18, 2024

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.

nils-hoyer avatar nils-hoyer commented on May 18, 2024

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.

nils-hoyer avatar nils-hoyer commented on May 18, 2024

I did some investigation today and can give the following result in return which lead to the error in our case.

  1. 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.

tobiasgrossmann avatar tobiasgrossmann commented on May 18, 2024

@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.

nils-hoyer avatar nils-hoyer commented on May 18, 2024

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.

tobiasgrossmann avatar tobiasgrossmann commented on May 18, 2024

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.

nils-hoyer avatar nils-hoyer commented on May 18, 2024

if you upload an example repo reproducing the error I can have a quick look on it.

from cypress-parallel.

gethari avatar gethari commented on May 18, 2024

I am facing the same problem

from cypress-parallel.

aaron-qa avatar aaron-qa commented on May 18, 2024

Same problem. Will check up on the PR linked above.

from cypress-parallel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.