Open mostmentor opened 2 years ago
When I try to run https://nightwatchjs.org/guide/running-tests/parallel-running.html#via-workers-multiple-environments I got error "Invalid testing environment specified:"
Invalid testing environment specified:
I found this can be fixed by just update line 133 in lib/runner/cli/cli.js to be : - this.testEnvArray = this.testEnv.split(' ');
lib/runner/cli/cli.js
this.testEnvArray = this.testEnv.split(' ');
After updating this it started but the test is running default only
nightwatch -e firefox,MicrosoftEdge,default --parallel 30
const settings = { "src_folders": ["tests/"], "page_objects_path": [ "./page_object" ], "globals_path": "globals.js", "webdriver": { "keep_alive": true }, "custom_commands_path": [ "./lib/custom_commands", "./node_modules/nightwatch-xhr/es5/commands" ], "custom_assertions_path": [ "./node_modules/nightwatch-xhr/es5/assertions" ], "test_settings": { "default": { "deviceFarmProject": "xxxx", "selenium": { "start_process": false, "host": "testgrid-devicefarm.us-west-2.amazonaws.com", "default_path_prefix": "xxxx", "port": 443 }, "skip_testcases_on_fail": false, "parallel_process_delay": 185, "silent": true, "exclude": [ "tests/sample-suite/*" ], "request_timeout_options": { "timeout": 180000, "retry_attempts": 2 }, "output_folder": "./reports", "end_session_on_fail": false, "desiredCapabilities": { "browserName": "chrome" } }, "firefox": { "deviceFarmProject": "xxxx", "selenium": { "start_process": false, "host": "testgrid-devicefarm.us-west-2.amazonaws.com", "default_path_prefix": "xxxx", "port": 443 }, "skip_testcases_on_fail": false, "parallel_process_delay": 185, "silent": true, "exclude": [ "tests/sample-suite/*" ], "request_timeout_options": { "timeout": 180000, "retry_attempts": 2 }, "output_folder": "./reports", "end_session_on_fail": false, "desiredCapabilities": { "browserName": "firefox" } }, "MicrosoftEdge": { "deviceFarmProject": "xxxx", "selenium": { "start_process": false, "host": "testgrid-devicefarm.us-west-2.amazonaws.com", "default_path_prefix": "xxxx", "port": 443 }, "skip_testcases_on_fail": false, "parallel_process_delay": 185, "silent": true, "exclude": [ "tests/sample-suite/*" ], "request_timeout_options": { "timeout": 180000, "retry_attempts": 2 }, "output_folder": "./reports", "end_session_on_fail": false, "desiredCapabilities": { "browserName": "MicrosoftEdge", "ms:edgeChromium": true } } }, "live_output": true, "detailed_output": true, "test_runner": { "type": "default", "options": { "bail": false, "retries": 0 } } } module.exports = new Promise(resolve => { resolve(settings); }); module.exports.settings = settings
2.3.9
16.17.0
firefox, edge, chrome
win 10
No response
PR #3425
After some investigation @mostmentor reported that the issue is with powershell:
We need to handle this case for windows.
Description of the bug/issue
When I try to run https://nightwatchjs.org/guide/running-tests/parallel-running.html#via-workers-multiple-environments I got error "
Invalid testing environment specified:
"I found this can be fixed by just update line 133 in
lib/runner/cli/cli.js
to be : -this.testEnvArray = this.testEnv.split(' ');
After updating this it started but the test is running default only
Command to run
Nightwatch Configuration
Nightwatch.js Version
2.3.9
Node Version
16.17.0
Browser
firefox, edge, chrome
Operating System
win 10
Additional Information
No response