Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Dec 02, 2019 16:28

Karma is a tool that runs Javascript tests on node.js in multiple, real browsers. This section explains how to use Karma with Perfecto. 

For the source code of the Perfecto plugin and a sample configuration file, see the following GitHub project:


Running Karma with Perfecto requires:

  • An installation of Karma. For instructions, see
  • A network connection to ensure that the browser has access to the local host. You may have to install Perfecto Connect or implement custom network settings.
  • A Perfecto security token for the user running the tests.

     Click to see how to generate a security token
    To generate a security token:
    1. In the Perfecto UI at <YourCloud> (where YourCloud is your actual cloud name, such as mobilecloud), click your user name and select My security token

    2. In the My security token form, click Generate Security Token.
    3. Click Copy to clipboard. Then paste it into any scripts that you want to run with Perfecto. 

    4. Click Close.

On this page:


To install the plugin for the Perfecto integration, run the following command:

npm install karma-perfecto-launcher

Sample configuration

For a sample configuration, see the karma.conf.js file. The following configuration parameters are mandatory:

perfectoUrlThe Perfecto cloud URL, in the following format: https://<yourcloud>
securityTokenA unique cryptographic key assigned to an authorized user. If you have not generated a security token yet, go back to the Prerequisites above.