GithubHelp home page GithubHelp logo

budde377 / karma-browserstack-launcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from karma-runner/karma-browserstack-launcher

0.0 2.0 0.0 51 KB

A Karma plugin. Launch any browser on BrowserStack!

License: MIT License

JavaScript 100.00%

karma-browserstack-launcher's Introduction

karma-browserstack-launcher

js-standard-style npm version npm downloads

Build Status Dependency Status devDependency Status

Use any browser on BrowserStack!

Installation

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

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

and it will be added automatically.

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)
  • binaryBasePath the BS binary base bath, you can also use BROWSER_STACK_BINARY_BASE_PATH env variable. This will override the default and set the base path to the BS local binary (optional)

Per browser options

  • device name of the device
  • real_mobile allow browserstack to use a simulator
  • browser name of the browser
  • browser_version version of the browser
  • os which platform ?
  • os_version version of the platform

Browserstack iOS simulators

By default, your Selenium and JS tests will run on real iOS devices on BrowserStack. Since we are in the implementation phase, we are still working on a few things, such as adding more devices, ability to test on local URLs, etc.

In case your tests are facing any issues on real iOS devices, we also provide iOS simulators where you can run your automated tests smoothly.

To access our iOS simulators, use the following capabilities:

customLaunchers: {
  iPad_3: {
    real_mobile: false,
    device: 'iPad 3rd (6.0)',
    os: 'ios',
    'os_version': '6.0',
    'browser_version': null,
    browser: 'Mobile Safari'
  }
}

List of iOS simulators you can test on:

  • device: 'iPad 3rd', 'os_version': '5.1'
  • device: 'iPad 3rd (6.0)', 'os_version': '6.0'
  • device: 'iPad Mini', 'os_version': '7.0'
  • device: 'iPad 4th', 'os_version': '7.0'
  • device: 'iPhone 4S', 'os_version': '5.1'
  • device: 'iPhone 4S (6.0)', 'os_version': '6.0'
  • device: 'iPhone 5', 'os_version': '6.0'
  • device: 'iPhone 5S', 'os_version': '7.0'

BrowserStack's REST API documentation explains how to retrieve a list of desired capabilities for browsers.


For more information on Karma see the homepage.


Check out sample code working with karma-browserstack-launcher here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.