karma-runner / karma-browserstack-launcher

A Karma plugin. Launch any browser on BrowserStack!
MIT License
150 stars 82 forks source link

Feature: Add support for Simplified Browser Options #146

Open cecilia-sanare opened 5 years ago

cecilia-sanare commented 5 years ago

Description

Hey there!

It'd be awesome if karma-browserstack-launcher supported a simplified configuration similar to what karma-sauce-launcher offers.

I'd suspect the underlying implementation would be similar to browserstack-capabilities.

Proposed API

module.exports = (config) => {
  config.set({
    customLaunchers: {
      Chrome: {
        base: 'BrowserStack',
        browser: 'chrome',
        browser_version: 'latest' // Chrome 73
      },

      ChromePrior: {
        base: 'BrowserStack',
        browser: 'chrome',
        browser_version: 'latest-1' // Chrome 72
      },

      Safari: {
        base: 'BrowserStack',
        browser: 'safari',
        browser_version: 'latest' // Safari 12
      }
    },

    browsers: ['Chrome', 'ChromePrior', 'Safari'],

    // ...
  });
};
Archish27 commented 3 years ago

BrowserStack supports latest & beta flag browsers.

browser_version: 'latest'
OR browser_version: 'latest-beta'

For more details check capabilities