cypress-docker-images icon indicating copy to clipboard operation
cypress-docker-images copied to clipboard

Cannot define correct root for output log file

Open mivanov1989 opened this issue 4 years ago • 0 comments

Hi Everyone, I run cypress tests in the container cypress/included:4.12.1 and I use cypress-terminal-report plugin to output test logs to a file that with path:

module.exports = (on, config) => { // ... const options = { outputRoot: config.projectRoot + '/logs/', outputTarget: { 'out.txt': 'txt' } };

I expect to have the file "out.txt" in the /e2e/logs directory, but nothing created there. I also tried to specify outputRoot: './logs/' but it does not create the file in the logs directory. I have tried the same on my Windows working laptop and the file is created in the project root in both cases.

How can I specify the output file path to have the log file created in the /e2e/logs directory?

Container config:

AttachStderr true AttachStdin false AttachStdout true Cmd [ cypress, run, --browser, chrome, --headless, --spec, /integration/wugappstate//*.js, --config, baseUrl=http://10.40.67.39/nmconsole,screenshotsFolder=./screenshots,video=true, --env, testEnv=300_cypress_pre,allure=false,ajaxRoot=http://10.40.67.39/nmconsole/,baseApiUrl=http://10.40.67.39:9644/api/ ] Domainname Entrypoint [ cypress, run ] Env [ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin, NODE_VERSION=12.18.0, YARN_VERSION=1.22.4, TERM=xterm, npm_config_loglevel=warn, npm_config_unsafe_perm=true, CHROME_VERSION=83.0.4103.61, DBUS_SESSION_BUS_ADDRESS=/dev/null, CI=1, QT_X11_NO_MITSHM=1, _X11_NO_MITSHM=1, _MITSHM=0, CYPRESS_CACHE_FOLDER=/root/.cache/Cypress ] Hostname 846826ff740e Image cypress/included:4.12.1 Labels { } OnBuild OpenStdin false StdinOnce false Tty false User root Volumes { /e2e: [object Object] } WorkingDir /e2e

mivanov1989 avatar Jun 04 '21 22:06 mivanov1989