question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to configure multiple browser's os, os.version and browser version for Browserstack execution

See original GitHub issue

What are you trying to achieve?

I want to run tests in browser stack on multiple browsers. When I say multiple browsers, I need privilege to configure its os, os.version and browser.version thru desiredCapabilities. I tried various possibilities but its not working.

What do you get instead?

A. Below errors. I know what it means but just to make sure I made the config file as advised from slack support.

paste output here

RangeError: Maximum call stack size exceeded
    at replaceValue (/usr/local/lib/node_modules/codeceptjs/lib/command/run-multiple.js:161:22)
    at replaceValue (/usr/local/lib/node_modules/codeceptjs/lib/command/run-multiple.js:172:7)
    at replaceValue (/usr/local/lib/node_modules/codeceptjs/lib/command/run-multiple.js:172:7)
    at replaceValue (/usr/local/lib/node_modules/codeceptjs/lib/command/run-multiple.js:172:7)
    at replaceValue (/usr/local/lib/node_modules/codeceptjs/lib/command/run-multiple.js:172:7)
    at replaceValue (/usr/local/lib/node_modules/codeceptjs/lib/command/run-multiple.js:172:7)
    at replaceValue (/usr/local/lib/node_modules/codeceptjs/lib/command/run-multiple.js:172:7)
    at replaceValue (/usr/local/lib/node_modules/codeceptjs/lib/command/run-multiple.js:172:7)
    at replaceValue (/usr/local/lib/node_modules/codeceptjs/lib/command/run-multiple.js:172:7)
    at replaceValue (/usr/local/lib/node_modules/codeceptjs/lib/command/run-multiple.js:172:7)

### Details

* CodeceptJS version: 1.4.3
* NodeJS Version: 6.4.1
* Operating System: Mac
* WebDriverIO  version: 4.13.2  
* Configuration file:

{
  "tests": "./end2end/tests/web/collectionOrder_01_test.js",
  "output": "./output",
  "multiple": {
    "basic": {
      "browsers": [
        {
          "desiredCapabilities": {
            "browser": "safari",
            "browserstack.os": "OS X",
            "browserstack.os_version": "High Sierra",
            "windowSize": "maximize",
            "browserstack.local": false,
            "browserstack.video": true,
            "ignoreHTTPSErrors": true,
            "acceptInsecureCerts": true,
            "acceptInvalidCerts": true,
            "acceptSslCerts": true
          }
        },
        {
          "desiredCapabilities": {
            "browser": "chrome",
            "browserstack.os": "OS X",
            "browserstack.os_version": "High Sierra",
            "windowSize": "maximize",
            "browserstack.local": false,
            "browserstack.video": true,
            "ignoreHTTPSErrors": true,
            "acceptInsecureCerts": true,
            "acceptInvalidCerts": true,
            "acceptSslCerts": true
          }
        }
      ]
    }
  },
  "helpers": {
    "WebDriverIO": {
      "url": "https://hidden.com/",
      "browser": "Chrome",
      "user": "hidden",
      "key": "hidden"
    },
    "WebDriverIOHelper": {
      "require": "./end2end/utility/webdriverio_helper.js"
    }
  },

  "include": {
    "homePage": "./end2end/pageObjects/homePage",
  },
  "bootstrap": false,
  "mocha": {},
  "name": "codecept",
  "plugins": {
    "allure": {
      "enabled": true
    }
  }
}


**Run Command**: codeceptjs run-multiple basic

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
elukoyanovcommented, Oct 21, 2018

1st Problem is in wrong parameters in config. Browserstack supports os and os_version instead of browserstack.os and browserstack.os_version.

2nd problem is about maximum callstack. Don’t use browser in desiredCapabilities. Array for multiple coniguration should consist of browser names (like chrome) or WebDriverIO configuration objects (object with ‘browser’ and ‘desiredCapabilities’ - https://codecept.io/helpers/WebDriverIO/#configuration)

Your should look’s like this:

{
  "tests": "./end2end/tests/web/collectionOrder_01_test.js",
  "output": "./output",
  "multiple": {
    "basic": {
      "browsers": [
        "chrome",
        {
          "browser": "safari",
          "desiredCapabilities": {
            "os": "OS X",
            "os_version": "High Sierra",
            "resolution": "maximize"
          }
        },
        {
          "browser": "chrome",
          "desiredCapabilities": {
            "os": "OS X",
            "os_version": "High Sierra",
            "resolution": "maximize"
          }
        }
      ]
    }
  },
  "helpers": {
    "WebDriverIO": {
      "url": "https://hidden.com/",
      "browser": "Chrome",
      "user": "hidden",
      "key": "hidden",
      "desiredCapabilities": {
        "browserstack.local": false,
        "browserstack.video": true,
        "ignoreHTTPSErrors": true,
        "acceptInsecureCerts": true,
        "acceptInvalidCerts": true,
        "acceptSslCerts": true
      }
    },
    "WebDriverIOHelper": {
      "require": "./end2end/utility/webdriverio_helper.js"
    }
  },

  "include": {
    "homePage": "./end2end/pageObjects/homePage"
  },
  "bootstrap": false,
  "mocha": {},
  "name": "codecept",
  "plugins": {
    "allure": {
      "enabled": true
    }
  }
}

For correct parameters use BrowserStack configuration tool https://www.browserstack.com/automate/capabilities

0reactions
juanpicadocommented, Aug 4, 2019

Thanks for the guidance @PeterNgTr . For future references https://codecept.io/hooks#bootstrapall-teardownall

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to configure multiple browser's os, os.version and ...
I want to run tests in browser stack on multiple browsers. When I say multiple browsers, I need privilege to configure its os,...
Read more >
Select browsers and devices for Selenium testing
Learn how to run your tests on the various browsers, OS and devices on BrowserStack Automate.
Read more >
Debug BrowserStack Automate failed to start browser error
This error occurs when BrowserStack is unable to launch the browser specified in ... If your test does not require a specific driver...
Read more >
Selenium WebDriver capabilities for running tests on ...
Default & BrowserStack specific capabilities for Automate, to run Selenium WebDriver tests with support for Local Testing, Debugging and 3000+ Mobile ...
Read more >
Cross Browser Testing in Selenium : Tutorial | BrowserStack
Cross browser testing refers to testing a website in multiple browsers like IE, Chrome, Firefox to check its efficacy on each. Cross-browser ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found