You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Run-multiple - Output directory path appended to test root path by codecept, So unable to create output directories #571
After upgrading to codeceptjs@0.6.3 for run-multiple
I am using run-multiple command for parallel execution. I am using mocha-reporter to generate output xml file. So I pass my custom directory path in output: /Users/madhusus/hydra-dev/src/node_modules/consumer-automation/test-reports
I am expecting the report file to be saved in this path.
What do you get instead?
Internally codecept is appending the "test root path" which is /Users/madhusus/hydra-dev/src/node_modules/nextgen-test/ to the path which I have passed in output.
So the end result for output directory will be '/Users/madhusus/hydra-dev/src/node_modules/nextgen-test/Users/madhusus/hydra-dev/src/node_modules/consumer-automation/test-reports/desktop_browser_chrome_1' which is invalid.
Provide console output if related. Use --verbose mode for more details.
creating output directory: /Users/madhusus/hydra-dev/src/node_modules/nextgen-test/Users/madhusus/hydra-dev/src/node_modules/consumer-automation/test-reports/desktop_browser_chrome_1
fs.js:922
return binding.mkdir(pathModule._makeLong(path),
^
Error: ENOENT: no such file or directory, mkdir '/Users/madhusus/hydra-dev/src/node_modules/nextgen-test/Users/madhusus/hydra-dev/src/node_modules/consumer-automation/test-reports/desktop_browser_chrome_1'
at Error (native)
at Object.fs.mkdirSync (fs.js:922:18)
at Command.module.exports (/Users/madhusus/hydra-dev/src/node_modules/nextgen-test/node_modules/codeceptjs/lib/command/run.js:26:8)
at Command.listener (/Users/madhusus/hydra-dev/src/node_modules/nextgen-test/node_modules/commander/index.js:301:8)
at emitTwo (events.js:106:13)
at Command.emit (events.js:191:7)
at Command.parseArgs (/Users/madhusus/hydra-dev/src/node_modules/nextgen-test/node_modules/commander/index.js:615:12)
at Command.parse (/Users/madhusus/hydra-dev/src/node_modules/nextgen-test/node_modules/commander/index.js:458:21)
at Object.<anonymous> (/Users/madhusus/hydra-dev/src/node_modules/nextgen-test/node_modules/codeceptjs/bin/codecept.js:106:9)
at Module._compile (module.js:570:32)
@APshenkin here is the config I export to codecept. I have filled the values.
As you can see, I am passing output value here, which means all my test results should be saved here but codecept is internally appending test root path to the output. So, the resulting output path will be test root + output, which will look like this.
Activity
APshenkin commentedon Jun 25, 2017
@shrikanthkm07 Could you, please, provide your codecept.conf.js file? Are you using something like mocha-multi or mochawesome?
I see only one place, where we override output path
where
config.outputis output from config and outputDir issuite + JSON.stringify(browserConfig).replace(/[^\d\w]+/g, '_') + suiteIdshrikanthkm07 commentedon Jun 27, 2017
@APshenkin here is the config I export to codecept. I have filled the values.
As you can see, I am passing
outputvalue here, which means all my test results should be saved here but codecept is internally appendingtest rootpath to theoutput. So, the resulting output path will betest root+output, which will look like this.where
and
is what I pass custom folder path
Codecept.conf.js
shrikanthkm07 commentedon Jun 27, 2017
@APshenkin
I found that , this line is appending test-root path to output path in run.js when we use run-multiple command.
PR : https://github.com/Codeception/CodeceptJS/pull/482/files
Any idea on this ?
APshenkin commentedon Jun 27, 2017
@shrikanthkm07 I think, we should call @DavertMik for this)
shrikanthkm07 commentedon Jun 28, 2017
@DavertMik Can you look into this..?
Thanks in advance
shrikanthkm07 commentedon Aug 29, 2017
Is there any update on this ? @DavertMik @APshenkin I am still facing this issue. Thanks
APshenkin commentedon Aug 29, 2017
@shrikanthkm07 I will take a look on it this week