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-workers with a multiple config doesn't create each worker's output directory (ENOENT when writing to output_dir) #5807
With a multiple config, run-workers N <run> sets each worker's output_dir to a sub-directory such as output/default_chromium1, but never creates it. Only the root output/ is created. Any test that writes into output_dir before a plugin happens to create the folder (e.g. the screenshot plugin on a failure) fails with ENOENT.
run-multiple with the same config works, because every child process goes through run, which calls createOutputDir() for its own output.
importpathfrom'path'Feature('Write to output_dir')Scenario('write a file into output_dir',({ I })=>{I.writeToFile(path.join(path.relative('',global.output_dir),'data.txt'),'hello')})
$ rm -rf output && npx codeceptjs run-workers 2 default
[Worker 01] FAIL | 0 passed, 1 failed
[Worker 02] FAIL | 0 passed, 1 failed
ENOENT: no such file or directory, open '.../repro/output/default_chromium1/data.txt'
ENOENT: no such file or directory, open '.../repro/output/default_webkit1/data.txt'
$ ls output
result.json
$ rm -rf output && npx codeceptjs run-multiple default
[2.default:webkit] OK | 1 passed
[1.default:chromium] OK | 1 passed
No browser is needed. The browsers entries only name the runs.
Expected
Each worker's output directory (output/default_chromium1, output/default_webkit1) exists before its tests start, the same as with run and run-multiple.
Cause
lib/command/run-workers.js and lib/workers.js (createOutputDir) create only config.output. createWorkerObjects() in lib/workers.js then sets _config.output = <output>/<workerName> and workerObj.runOutputDir, but nothing calls mkdirp on that path. A mkdirp.sync(workerObj.runOutputDir) there, or in the worker on startup, would fix it.
Environment
CodeceptJS 4.2.4, and also 3.7.9 (same result with a CommonJS version of the repro)
changed the title [-]4.x: run-workers with a multiple config doesn't create each worker's output directory (ENOENT when writing to output_dir)[/-][+]run-workers with a multiple config doesn't create each worker's output directory (ENOENT when writing to output_dir)[/+]on Nov 16, 2026
Activity
[-]4.x: run-workers with a multiple config doesn't create each worker's output directory (ENOENT when writing to output_dir)[/-][+]run-workers with a multiple config doesn't create each worker's output directory (ENOENT when writing to output_dir)[/+]fix(workers): create output directory of each run in run-workers (#5807…