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.
npm install --save-dev browserstack-filter-tool
or
yarn add -D browserstack-filter-tool
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']
}
}
}
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
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,
...
});
};
Please see in LICENSE file.