Skip to content

Commit

Permalink
enable parallelism on any selenium host
Browse files Browse the repository at this point in the history
  • Loading branch information
gravityvi committed Nov 14, 2023
1 parent 39fe866 commit 4d62831
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/runner/cli/cli.js
Expand Up @@ -446,7 +446,7 @@ class CliRunner {
usingServer(test_settings = {}) {
// TODO: selenium_host and seleniumHost are for backwards compatability.
// remove these in future versions.
return test_settings.selenium?.host || test_settings.selenium_host || test_settings.seleniumHost;
return Utils.isObject(test_settings.selenium) || test_settings.selenium_host || test_settings.seleniumHost;
}

isTestWorkersEnabled() {
Expand All @@ -464,7 +464,7 @@ class CliRunner {
const {webdriver = {}} = this.testEnvSettings[env];
const desiredCapabilities = this.testEnvSettings[env].capabilities || this.testEnvSettings[env].desiredCapabilities;

if (isMobile(desiredCapabilities) && this.usingServer(this.testEnvSettings[env])) {
if (isMobile(desiredCapabilities) && !this.usingServer(this.testEnvSettings[env])) {

if (Concurrency.isWorker()) {
Logger.info('Disabling parallelism while running tests on mobile platform');
Expand Down
1 change: 1 addition & 0 deletions test/src/runner/cli/testCliRunnerParallel.js
Expand Up @@ -227,6 +227,7 @@ describe('Test CLI Runner in Parallel', function () {
},
'simulator.ios': {
selenium: {
host: 'localhost',
use_appium: true
},
desiredCapabilities: {
Expand Down

0 comments on commit 4d62831

Please sign in to comment.