Custom launcher for Karma that allows testing remotely through CrossBrowserTesting.
Last updated 2 years ago by timmytango .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @cbt/karma-cbt-launcher 
SYNC missed versions from official npm registry.


Run your Karma tests on CrossBrowserTesting's platform.

A large portion of this code was originally taken and modified from Actano/Marcus Mennemeier's karma-cbt-launcher. The original code can be found here.


npm install @cbt/karma-cbt-launcher --save-dev


Setup your tests in Karma as you normally would and modify your config file with the customLaunchers and cbtConfig values. See the example directory for a sample test and karma config file.


module.exports = (config) => {
    singleRun: true,
    frameworks: ['jasmine'],
    plugins: [
    preprocessors: {
      'tests/*.html': ['html2js']
    files: [
    logLevel: config.LOG_DEBUG,
    browsers: [
    reporters: [
    cbtConfig: {
      username: 'CBT_USERNAME',
      authkey: 'CBT_AUTHKEY',
    customLaunchers: {
      win7_ie11: {
        base: 'CrossBrowserTesting',
        browserName: 'win7_ie11',
        browser_api_name: 'IE11',
        os_api_name: 'Win7x64',
        screen_resolution: '1366x768',
      win10_edge20: {
        base: 'CrossBrowserTesting',
        browserName: 'win10_edge20',
        browser_api_name: 'Edge20',
        os_api_name: 'Win10',
        screen_resolution: '1920x1080',

You can also specify the username and authkey using environment variables: CBT_USERNAME and CBT_AUTHKEY


A custom reporter 'CrossBrowserTesting' is also included that will mark a test as pass if all tests return success. If a single test returns failed, the entire suite for that device will be marked failed on the CBT results page. The results message will also be set with the number of tests passed and the number that failed.

Current Tags

  • 0.4.2                                ...           latest (2 years ago)

3 Versions

  • 0.4.2                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
Maintainers (1)
Today 0
This Week 3
This Month 3
Last Day 0
Last Week 0
Last Month 4
Dependencies (3)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |