Skip to content

lin826/browserstack-filter-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BrowserStack Filter Tool

This is a filter tool to select the most recent browsers from BrowserStack API.

No dependency in this project.

But remember to add browserstack-helper.conf.js file into your root folder.

Usage

Installation

npm install --save-dev browserstack-filter-tool

or

yarn add -D browserstack-filter-tool

Setting

Manually create a file browserstack-helper.conf.js like below:

module.exports = {
  // Replace with your Browserstack account's username and accessKey
  username: BROWSERSTACK_USERNAME,
  accessKey: BROWSERSTACK_ACCESS_KEY,

  osList: {
    'OS X': ['Mojave'],
    'Windows': ['10']
  },

  browserList: [ 'edge', 'chrome', 'firefox', 'safari' ],

  excludeList: [
    { os: 'Windows', browser: 'safari' }
  ],

  browserVersionRange: 2,

  templateLauncher: {
    base: 'BrowserStack'
  },

  additionalLaunchers: {
    NameOfLauncher: {
        base: 'ChromeHeadless',
        flags: ['--no-sandbox']
    }
  }
}

Build and Run

Please add a script wherever before karma start karma.conf.js (usually in package.json).

That is, use

node ./node_modules/browserstack-filter-tool/launcher-generator.js && karma start karma.conf.js

instead of

karma start karma.conf.js

Import into the configuration

Your configuration can be set like this.

// karma.conf.js
const browserstackLaunchers = require('./browserstack-launchers');

module.exports = (config) => {
  config.set({
    ...
    browsers: Object.keys(browserstackLaunchers),
    customLaunchers: browserstackLaunchers,
    ...
  });
};

LICENSE

Please see in LICENSE file.

NPM

https://www.npmjs.com/package/browserstack-filter-tool

About

A filter tool to select the most recent browsers from BrowserStack API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published