Skip to content
KITE is a test engine designed to test WebRTC interoperability across browsers
Branch: master
Clone or download

README.md

This is KITE 2.0, Karoshi Interoperability Testing Engine (version 2.0)

The effortless way to test WebRTC compliance, prevent Karoshi with KITE!

Write automated interoperability test scripts in Java or Javascript and run them on any platforms. KITE supports:

  • all web browser: Chrome, Firefox, Safari, Edge, Opera... on all OS (Linux, Windows, Mac, iOS and Android)
  • Mobile Native Apps on Android, iOS
  • Desktop Native Apps on Windows and MacOS
  • Electron Apps

KITE can be setup on Windows, Mac or Linux. The installation process only takes 10 to 15 minutes.

Additional free WebRTC sample tests are available https://github.com/CoSMoSoftware/KITE-Sample-Tests

For advanced features such as:

  • load testing
  • network instrumentation
  • sample tests on native apps

Please contact contact@cosmosoftware.io

This is not an official Google product

See LICENSE for licensing.  

A. Install prerequisite software

You will need Git, JDK 8 and Maven. Here's where you can find them:

Maven installation

If you are not familiar with Maven and/or new to the concept of PATH and environmnent variables, Maven's installation can prove quite tricky as it requires you to add JAVA_HOME to your environment variables and MAVEN/bin to your PATH. To make this easier, we're providing an installation script. If you would like to use our script to install Maven, you can skip it for now and install it after cloning the git repo (following the instructions at B.2.).

Alternatively, you can always install Maven manually and the following guides could help you with this:

To verify your setup, in a new command prompt or shell terminal, type:

mvn -version

Expected output (for example on Windows 10):

Apache Maven 3.6.1
Maven home: C:\Program Files\Maven\apache-maven-3.6.1\bin\..
Java version: 1.8.0_191, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_191\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Install your favorite Java IDE. We recommend IntelliJ IDEA Community but you can use Eclipe or any other IDE if you prefer.  

B. Install KITE 2.0

  1. Clone this repo into a folder without any space, for example under \GitHub\:

    mkdir GitHub
    cd GitHub
    git clone https://github.com/webrtc/KITE.git
    cd KITE
    
  2. Maven installation

    If you haven't installed Maven yet, you can install it using the installMaven script.

    On Windows, open a Command Prompt window and enter the following commands:

    scripts/windows/installMaven.bat
    

    On Linux, open a terminal and enter the following commands:

    chmod -R +x /scripts/linux
    scripts/linux/installMaven.sh
    

    2.3 On Mac, open a terminal and enter the following commands:

    chmod -R +x /scripts/mac
    scripts/mac/installMaven.sh
    
  3. Configure KITE

    This will set KITE_HOME environment variable and add utility scripts to your path.

    3.1 On Windows, open a Command Prompt window and enter the following commands:

    configure.bat
    

    3.2 On Linux, open a terminal and enter the following commands:

    chmod +x configureLinux.sh
    ./configureLinux.sh
    

    3.3 On Mac, open a terminal and enter the following commands:

    chmod +x configureMac.sh  
    ./configureMac.sh
    

    During this step, you will be prompt to setup the local grid. This is an interactive setup. It is important to configure the Firefox and Chrome versions according to the versions installed on your computer.
    If Chrome and/or Firefox are not installed, this script will automatically download and install the latest stable releases.

    To check the browser versions:
    1. Chrome
    Open Chrome and enter chrome://settings/help into the address bar.

    2. Firefox
    Open Firefox, top right menu, then select Help, then About Firefox. You can also find out the latest version at www.mozilla.org/en-US/firefox/releases/.

    Different browser versions require a different ChromeDriver (to control Chrome) and a different GeckoDriver (to control Firefox). You will need to find out what are the corresponding driver versions. Please visit the following two pages:

    By default, the local grid setup script is configured for Chrome version 74 and Firefox version 66. If these are the versions installed on your computer, you can safely use the default settings. Otherwise, you will need to edit the following settings when prompt to do so:

    CHROME_VERSION=74
    FIREFOX_VERSION=66
    CHROMEDRIVER_VERSION=74.0.3729.6
    GECKO_VERSION=v0.24.0
    

    Note: Please input only the major (i.e. 74 or 66) for the browser versions, but the full version with the minor (i.e. 74.0.3729.6 or v0.24.0) for the driver versions.
    More details are available in the local grid setup guide.

  4. Compile

On Windows:
Just type c (which will execute mvn clean install -DskipTests).

```
cd %KITE_HOME%
c
```

If you are within a test folder, for example in KITE-AppRTC-Test, you can type c to compile the test module only or c all to recompile the entire project:

```
cd %KITE_HOME%\KITE-AppRTC-Test  
c all
```  

On Linux/Mac:
Just type c (which will execute mvn clean install -DskipTests). cd $KITE_HOME c If you are within a test folder, for example in KITE-AppRTC-Test, you can type c to compile the test module only or c all to recompile the entire project:

```
cd $KITE_HOME/KITE-AppRTC-Test
c all
```

C. Install the local grid

If you have chosen to skip the grid installation during configure, you can still do it by following local grid setup guide.

 
 

D. Run the sample tests

Note: You will need to have your local grid running before you can execute any test.
You can check if your local grid is running and the browser versions installed by opening the Grid Console. In the following example, we are assuming Chrome version 74 and Firefox version 66.

Edit the test config file

If your Grid is running on localhost and with Chrome version 74 and Firefox version 66 you can skip this step.

Edit the file ./KITE-Example-Test/configs/example.config.json with your favorite text editor.
You will need to change version and platform according to what is installed on your local grid. For example, if your local grid is windows and the latest stable version of Chrome is 74, you should set:

      "version": "74",
      "platform": "WINDOWS",

If you're using Linux or Mac, change "WINDOWS" to "LINUX" or "MAC". Alternatively, you can use localhost as the platform name if the grid is running on your localhost, KITE will automatically set it according to your OS.

You can find more information about the Basic Configuration File here.

Run KITE-Example-Test

To run the example test,

On Windows:

cd %KITE_HOME%\KITE-Example-Test
r configs\example.config.json

On Linux/Mac:

cd $KITE_HOME/KITE-Example-Test
r configs/example.config.json

Run KITE-AppRTC-Test

Edit the file ./KITE-AppRTC-Test/configs/iceconnection.local.config.json with your favorite text editor.
You will need to change version and platform according to what is installed on your local grid.

To run the AppRTC iceconnection test,

On Windows:

cd %KITE_HOME%\KITE-AppRTC-Test
r configs\iceconnection.local.config.json

On Linux/Mac:

cd $KITE_HOME/KITE-AppRTC-Test
r configs/iceconnection.local.config.json

Alternatively, you can launch the test with the full command.

On Windows:

java -Dkite.firefox.profile="%KITE_HOME%"/third_party/ -cp "%KITE_HOME%/KITE-Engine/target/kite-jar-with-dependencies.jar;target/*" org.webrtc.kite.Engine configs/iceconnection.local.config.json

On Linux/Mac:

java -Dkite.firefox.profile="$KITE_HOME"/third_party/ -cp "$KITE_HOME/KITE-Engine/target/kite-jar-with-dependencies.jar:target/*" org.webrtc.kite.Engine configs/iceconnection.local.config.json

Open the dashboard

After running the test, you can open the Allure dashboard with the command a.

On Windows:

cd %KITE_HOME%\KITE-AppRTC-Test
a

On Linux/Mac:

cd $KITE_HOME/KITE-AppRTC-Test
a

Congratulation! You should see the results of your first KITE test.

KITE Test Dashboard

Alternatively, the full command to launch the Allure dashboard is:

allure serve kite-allure-reports

Basic configuration file

The example example.config.json file is almost the simplest config file you can get (Change the version of browsers to the appropriated one that you have installed on your testing machine):

{
  "name": "Kite test example (with Allure reporting)",
  "callback": null,
  "remotes": [
    {
      "type": "local",
      "remoteAddress": "http://localhost:4444/wd/hub"
    }
  ],
  "tests": [
    {
      "name": "KiteExampleTest",
      "tupleSize": 1,
      "description": "This example test opens google and searches for Cosmo Software Consulting and verify the first result",
      "testImpl": "KiteExampleTest",
      "payload" : {
        "test1": "ONE",
        "test2": "TWO"
      }
    }
  ],
  "browsers": [
    {
      "browserName": "chrome",
      "version": "74",
      "platform": "WINDOWS",
      "flags": []
    },
    {
      "browserName": "firefox",
      "version": "66",
      "platform": "WINDOWS",
      "flags": []
    }
  ]
}

It registers only selenium server in the local machine:

  "remotes": [
    {
      "type": "local",
      "remoteAddress": "http://localhost:4444/wd/hub"
    }
  ],

It registers IceConnectionTest class as a test (this class is implemented in KITE-AppRTC-Test)

  "tests": [
    {
      "name": "KiteExampleTest",
      "tupleSize": 1,
      "description": "This example test opens google and searches for Cosmo Software Consulting and verify the first result",
      "testImpl": "KiteExampleTest",
      "payload" : {
        "test1": "ONE",
        "test2": "TWO"
      }
    }
  ],

It requests for firefox and chrome. Version and platform are required fields. Version and platform actually used in the tests will be reported in the result, and will appear in the dashboard.

Sample config files in KITE-Example-Test/configs contain the example with different browser, version and platform configuration, take a closer look

  "browsers": [
    {
      "browserName": "chrome",
      "version": "74",
      "platform": "LINUX",
      "flags": []
    },
    {
      "browserName": "firefox",
      "version": "66",
      "platform": "MAC",
      "flags": []
    }
  ]

If the grid is running on localhost (same machine as KITE), then you can use localhost as the platform name, KITE will automatically set it according to your OS. However, if the grid or selenium node is not running on localhost, you must set the platform name according to the OS of the node (MAC, WINDOWS, LINUX, Android...)

You can’t perform that action at this time.