Open mostmentor opened 4 months ago
Any updates on this issue ?
@mostmentor One way to solve this is to use different output_folder
for different envs.
For example:
"test_settings": {
"default": {
"localOption": true,
"skip_testcases_on_fail": false,
"end_session_on_fail": false,
"disable_error_log": false,
"screenshots": {
"enabled": false,
"path": "screens",
"on_failure": true
},
"desiredCapabilities": {
"browserName": "chrome"
},
"webdriver": {
"port": 9515,
"start_process": true,
"server_path": "node_modules/chromedriver/lib/chromedriver/chromedriver.exe"
},
"reporter_options": {
"output_folder": "tests_output/default"
}
},
"qa": {
"launch_url": "some_url",
"reporter_options": {
"output_folder": "tests_output/qa"
}
},
"dev": {
"launch_url": "some_url",
"reporter_options": {
"output_folder": "tests_output/dev"
}
}
},
@garg3133 It's not working
@mostmentor That would mean you already have output_folder
set somewhere. Try mentioning output_folder
directly inside the envs instead of inside reporter_options
, like below:
"qa": {
"launch_url": "some_url",
"output_folder": "tests_output/qa"
},
"dev": {
"launch_url": "some_url",
"output_folder": "tests_output/dev"
}
@garg3133 This didn't work either. The html,xml and json reports are exported to tests_output
When I used --trace the snapshots got added to output/qa
and output/dev
but the other reports(xml,html,json) are still exported to test_output
Description of the bug/issue
I'm running a test on multiple envs (dev,qa,stage,...) all on same browser (Chrome). I noticed that only one XML is found at the end of the run because each time the Junit XML is overwritten with same reportPrefix (check here https://github.dev/nightwatchjs/nightwatch/blob/b7339c46ea3eb395ae790ade62061fd7037f836c/lib/reporter/reporters/junit.js#L61 ) I tried to log reportPrefix at the end of the tests and it always has same name
reportPrefix: 'CHROME_126.0.6478.127__'
Steps to reproduce
Sample test
No response
Command to run
Verbose Output
No response
Nightwatch Configuration
Nightwatch.js Version
3.7.0
Node Version
No response
Browser
No response
Operating System
No response
Additional Information
No response