---
title: Run Selenium Javascript tests with karma on real browsers
description: Our cloud of browsers will run your javascript unit tests with a Karma
  runner
source_url:
  html: https://testingbot.com/support/web-automate/selenium/javascript/karma
  md: https://testingbot.com/support/web-automate/selenium/javascript/karma/index.md
---
# Javascript unit testing with Karma

We've prepared an example with full TestingBot integration which is easy to set up and run.   
 With our integrated `karma-testingbot-launcher`, you can easily run tests with Karma on TestingBot.   
 Our launcher will automatically start/stop a tunnel and report back the test results to us.

## Installing the example

Make sure you have installed both `git` and `NodeJS`.   
 Then proceed to clone our [karma-testingbot-example](https://github.com/testingbot/karma-testingbot-example) with the follow commands:

    git clone https://github.com/testingbot/karma-testingbot-example.git
    cd karma-testingbot-example

Once that's installed, please run the follow command to set up the example:

    sudo npm install -g karma-cli && npm install

## Run Karma test with our [karma-testingbot-launcher](https://github.com/karma-runner/karma-testingbot-launcher) plugin

In the example's directory, you'll find a file `karma.conf-testingbot.js` which contains a "customLaunchers" variable with multiple browsers defined. This is the place where you specify on which browsers you want your test to run.

To actually run the test on TestingBot, we first need to specify the `TESTINGBOT_KEY` and `TESTINGBOT_SECRET` environment variables, which you can find in our member area.

    export TESTINGBOT_KEY=YOUR_KEY
    export TESTINGBOT_SECRET=YOUR_SECRET

Now you're ready to run the test on TestingBot.   
 To start the test, run the following command:

    karma start karma.conf-testingbot.js

This will download and start our [TestingBot Tunnel](https://testingbot.com/support/tunnel), run your test and report back the result.

### Looking for more help?

Have questions or need more information? Reach out via email or Slack.

[Email us](https://testingbot.com/contact/new)[Slack Join our Slack](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
