karma-browserstack-launcher

A Karma plugin. Launch any browser on BrowserStack!

npm install karma-browserstack-launcher
223 downloads in the last day
1 490 downloads in the last week
8 053 downloads in the last month

karma-browserstack-launcher

Use any browser on BrowserStack!

Installation

The easiest way is to keep karma-browserstack-launcher as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-browserstack-launcher": "~0.1"
  }
}

You can also add it by this command:

npm install karma-browserstack-launcher --save-dev

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    // global config of your BrowserStack account
    browserStack: {
      username: 'jamesbond',
      accessKey: '007'
    },

    // define browsers
    customLaunchers: {
      bs_firefox_mac: {
        base: 'BrowserStack',
        browser: 'firefox',
        browser_version: '21.0',
        os: 'OS X',
        os_version: 'Mountain Lion'
      },
      bs_iphone5: {
        base: 'BrowserStack',
        device: 'iPhone 5',
        os: 'ios',
        os_version: '6.0'
      }
    },

    browsers: ['bs_firefox_mac', 'bs_iphone5']
  });
};

Global options

  • username your BS username (email), you can also use BROWSER_STACK_USERNAME env variable.
  • accessKey your BS access key (password), you can also use BROWSER_STACK_ACCESS_KEY env variable.
  • startTunnel do you wanna establish the BrowserStack tunnel ? (defaults to true)
  • retryLimit how many times do you want to retry to capture the browser ? (defaults to 3)
  • captureTimeout the browser capture timeout (defaults to 120)
  • timeout the BS worker timeout (defaults to 300
  • build the BS worker build name (optional)
  • name the BS worker name (optional)
  • project the BS worker project name (optional)

Per browser options

  • device name of the device
  • browser name of the browser
  • browser_version version of the browser
  • os which platform ?
  • os_version version of the platform

For an example project of, check out Karma's e2e test.


For more information on Karma see the homepage.

npm loves you