GithubHelp home page GithubHelp logo

webrtc / kite Goto Github PK

View Code? Open in Web Editor NEW
469.0 53.0 125.0 21.22 MB

KITE is a test engine designed to test WebRTC interoperability across browsers

License: Apache License 2.0

Java 84.50% JavaScript 3.03% Batchfile 4.27% Shell 8.11% VBScript 0.09%

kite's Introduction

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

* Change to kite command (28 December 2020), all existing commands need prefix kite_ (Ex: r -> kite_r)

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
The sample tests cover all the major open-source SFUs demos:

  • Jisti
  • Janus
  • Kurento/openvidu
  • Mediasoup
  • Medooze (Simulcast demo)

KITE also supports additional features such as:

  • Load Testing (> 100,000 clients)
  • Native Apps Testing on Android, iOS, Windows and MacOS
  • Network Instrumentation in the cloud or on premises, for all platforms (browser and native) Please contact [email protected] for more information.

Tutorials: Writing a simple KITE Test for Jitsi in Java and/or Javascript

Once you've completed the installation and run the sample tests, pleaae try to write your own KITE test following our tutorials.

This is not an official Google product

See LICENSE for licensing.  

A. Install prerequisite software

You will need Git, JDK 8 and Maven.

Git

You can download it from:
Git

Java Development Kit 8

You can download it from:
JDK 8
Set JAVA_HOME:

  • On Windows:
    • Right click My Computer and select Properties.
    • On the Advanced tab, select Environment Variables, and then add a new variable JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.8.0_271.
    • Edit the variable PATH and add %JAVA_HOME%\bin
  • On UNIX System:
    • For Korn and bash shells, run the following commands:
      • export JAVA_HOME=jdk-install-dir (for example /usr/lib/jvm/openjdk-8; you can use the command readlink -f $(which java) to help you find the folder)
      • export PATH=$JAVA_HOME/bin:$PATH
    • For the bourne shell, run the following commands:
      • JAVA_HOME=jdk-install-dir (for example /usr/lib/jvm/openjdk-8; you can use the command readlink -f $(which java) to help you find the folder)
      • export JAVA_HOME
      • PATH=$JAVA_HOME/bin:$PATH
      • export PATH
    • For the C shell, run the following commands:
      • setenv JAVA_HOME jdk-install-dir (for example /usr/lib/jvm/openjdk-8; you can use the command readlink -f $(which java) to help you find the folder)
      • setenv PATH $JAVA_HOME/bin:$PATH
      • export PATH=$JAVA_HOME/bin:$PATH
  • On Mac:
    • sudo vi ~/.profile
    • Add the following line
      • export JAVA_HOME=$(/usr/libexec/java_home)
    • Save the file by tapping on ESC button on the keyboard and then :wq. This will save the file and will quite.
    • source ~/.profile
Maven installation

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, if you are familiar with setting up Maven and configuring the PATH and environment variables, you can download Maven from
https://maven.apache.org/download.cgi

The following guides could help you:

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"

You might need to create the file ~/.m2/settings.xml:

<settings>
  <mirrors>
    <mirror>
      <id>internal-repository</id>
      <name>Maven Repository Manager running on repo.mycompany.com</name>
      <url>http://repository.springsource.com/maven/bundles/external</url>
      <mirrorOf>com.springsource.repository.bundles.external</mirrorOf>
    </mirror>
  </mirrors>
</settings>

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

If you are on Mac and are using zsh, please make sure to add the following line add the end of your ~/.zshrc file:

source .bash_profile

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
    

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

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

    You might need to create the file ~/.m2/settings.xml:

<settings>
  <mirrors>
    <mirror>
      <id>internal-repository</id>
      <name>Maven Repository Manager running on repo.mycompany.com</name>
      <url>http://repository.springsource.com/maven/bundles/external</url>
      <mirrorOf>com.springsource.repository.bundles.external</mirrorOf>
    </mirror>
  </mirrors>
</settings>
  1. 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 87 and Firefox version 83. 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=87
    FIREFOX_VERSION=83
    CHROMEDRIVER_VERSION=87.0.4280.88
    GECKO_VERSION=v0.26.0
    

    Note: Please input only the major (i.e. 83 or 77) for the browser versions, but the full version with the minor (i.e. 87.0.4280.88 or v0.26.0) for the driver versions.
    The latest version of ChromeDriver is available at: https://chromedriver.storage.googleapis.com/LATEST_RELEASE More details are available in the local grid setup guide.

    3. Safari
    Safari is installed by default on MacOS, there is no need to download anything. You will only need to enable the 'Allow Remote Automation' option in Safari's Developer menu so it can be automated by KITE for testing.

  2. Compile

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

```
cd %KITE_HOME%
kite_c
```

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

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

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

```
cd $KITE_HOME/KITE-AppRTC-Test
kite_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 87 and Firefox version 83.

Edit the test config file

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

Edit the file ./KITE-Example-Test/configs/search.local.config.json with your favorite text editor.

Version

You will need to change version according to what is installed on your local grid. For example, if the latest stable version of Chrome is 87, you should set:

      "browserName": "chrome",
      "version": "87",
      "platform": "localhost",

Platform

When KITE is running on the same computer as the Grid, it will detect the OS and interpret the plaform "localhost" and translate it to WINDOWS, LINUX or MAC.
If you want to run KITE against a Grid that is running on a different computer, you will need to change the platform according to what's available on your Grid and you will need to change the platform to "WINDOWS" to "LINUX" or "MAC".

Example for Windows:

      "browserName": "chrome",
      "version": "87",
      "platform": "WINDOWS",

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
kite_r configs\search.local.config.json

On Linux/Mac:

cd $KITE_HOME/KITE-Example-Test
kite_r configs/search.local.config.json

Run KITE-AppRTC-Test

Edit the file ./KITE-AppRTC-Test/configs/iceconnection.apprtc.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
kite_r configs\iceconnection.apprtc.config.json

On Linux/Mac:

cd $KITE_HOME/KITE-AppRTC-Test
kite_r configs/iceconnection.apprtc.config.json

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

On Windows:

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

On Linux/Mac:

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

Open the dashboard

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

On Windows:

cd %KITE_HOME%\KITE-AppRTC-Test
kite_a

On Linux/Mac:

cd $KITE_HOME/KITE-AppRTC-Test
kite_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 search.local.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,
  "grids": [
    {
      "type": "local",
      "url": "http://localhost:4444/wd/hub"
    }
  ],
  "tests": [
    {
      "name": "KiteExampleSearchTest",
      "tupleSize": 1,
      "description": "This example test opens google and searches for Cosmo Software Consulting and verify the first result",
      "testImpl": "org.webrtc.kite.example.KiteExampleSearchTest",
      "payload" : {
        "test1": "ONE",
        "test2": "TWO"
      }
    }
  ],
  "clients": [
    {
      "browserName": "chrome",
      "version": "87",
      "platform": "WINDOWS",
      "flags": []
    },
    {
      "browserName": "firefox",
      "version": "77",
      "platform": "WINDOWS",
      "flags": []
    }
  ]
}

It registers only selenium server in the local machine:

  "grids": [
    {
      "type": "local",
      "url": "http://localhost:4444/wd/hub"
    }
  ],

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

  "tests": [
    {
      "name": "KiteExampleSearchTest",
      "tupleSize": 1,
      "description": "This example test opens google and searches for Cosmo Software Consulting and verify the first result",
      "testImpl": "org.webrtc.kite.example.KiteExampleSearchTest",
      "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

  "clients": [
    {
      "browserName": "chrome",
      "version": "87",
      "platform": "LINUX",
      "flags": []
    },
    {
      "browserName": "firefox",
      "version": "77",
      "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...)

Upload result files to a different machine

One can upload its result files with FTP on a different machine. For this, a FTP server should run on the target machine. Host IP, port, username and password can be added to the config file. An example:

  "tests": [
    {
      "name": "KiteExampleSearchTest",
      "tupleSize": 1,
      "description": "This example test opens google and searches for Cosmo Software Consulting and verify the first result",
      "testImpl": "org.webrtc.kite.example.KiteExampleSearchTest",
      "callbackUrl": "192.168.1.2",
      "callbackPort": 2221,
      "callbackUsername" : "username",
      "callbackPassword": "password",
      "payload" : {
        "test1": "ONE",
        "test2": "TWO"
      }
    }
  ],

If filled, KITE will zip the result files, then try to connect to the machine and upload the archives to the working directory. One use of this is, when the FTP server is configured to handle these archives, it can unzip the archives and generate the report to a directory served by a webserver:

allure generate . --output /var/www/results

kite's People

Contributors

a-nguyenv avatar agouaillard-cosmo avatar alvestrand avatar ashellunts avatar dbaldassi avatar dependabot[bot] avatar emmanuelandre avatar josemrecio-cosmo avatar namvucosmo avatar namvuinsa avatar nemani avatar piasy avatar sajidcosmo avatar scastrec avatar silverark avatar youennf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kite's Issues

Readme refers to outdated facts

Regarding this line in the readme:

Attention: WebDriver for Firefox on Windows has some limitations (not supporting testing involving using media, or Firefox profile with fake media stream)

Did you file bugs for these? If so, what were their numbers? If not, please do so at https://bugzilla.mozilla.org/ so they can be fixed.

The former ("not supporting testing involving using media") would be useful to get some data on.

The latter ("Firefox profile with fake media stream") should be fixed in Firefox 57 by https://bugzilla.mozilla.org/show_bug.cgi?id=1390521 (released in November).

Issue in Streaming media file or fake media for sfu mode in chrome only

Hi,
I am doing load testing using kite framework, When I am using fake media or playing media file in chrome browser in sfu mode(more than 2 participants) then media stream is not publishing to others. Only self video stream is there. This is happening only in chrome browser and for all the other browsers like Firefox, it is working fine.
webrtc

I need support about KITE and Docker Swarm

I can successfully run KITE tests through hub/nodes between different machines (using ip addresses). Now i want to extend this on Docker (Swarm mode). Since I am very new to Docker, can anyone provide support how can i achieve this ?!

Create a local peer-to-peer test

It looks to me certain features of WebRTC, like the bundle or rtcp-mux policies, are going to be really hard to test by making calls through live services on the Internet.

Assumption:

  • KITE does not inject a JS shim to intercept the API calls made by the services to be able to make changes for a given test
  • the live services won't offer a way to control via parameters all aspects of WebRTC connections

Therefore I think it might be beneficial to start investigating how to create a minimalistic peer-to-peer call.

Create a rtcp-mux policy test

It would be helpful to have a test case which shows that all browsers still interop with the different values for the rtcp-mux policy.

Incorrect or obsolete command

On step 3.2
chmod +x configure.sh
./configure.sh

There is not file called configure.sh, the only one .sh files are configureLinux.sh and configureMac.sh.
Those files are located on KITE folder which was created on step 1.

How do I stop KITE in sending fake media ?

HI,

How do I stop the KITE in sending the fake Video streaming ?Whenever I run the test,KITE is sending a fake video.
I don't want the fake media streaming during my test run.Please advise

Create a bundle policy test

In the past there have been interop issue between Chrome and Firefox on bundle policy topic. Therefore it would be great to create a test case which ensures that calls between all browsers work with all possible combinations of the bundle policy.

computePacketLoss appear when I try to get WebRTC Stats via getStats ?

I have written below scripts and I get this computePacketLoss:

GetStatsStep:
`const {TestUtils, TestStep, Status, KiteTestError} = require('kite-common');

class GetStatsStep extends TestStep {
constructor(kiteBaseTest) {
super();
this.driver = kiteBaseTest.driver;
this.statsCollectionTime = kiteBaseTest.statsCollectionTime;
this.statsCollectionInterval = kiteBaseTest.statsCollectionInterval;
this.selectedStats = kiteBaseTest.selectedStats;
this.page = kiteBaseTest.page;
this.peerConnections = kiteBaseTest.peerConnections;

// Test reporter if you want to add attachment(s)
this.testReporter = kiteBaseTest.reporter;

}

stepDescription() {
return 'Getting WebRTC stats via getStats';
}

async step() {
try {
let rawStats = await this.page.getStats(this);
let summaryStats = TestUtils.extractJson(rawStats, 'both');
// // Data
this.testReporter.textAttachment(this.report, 'GetStatsRaw', JSON.stringify(rawStats, null, 4), "json");
this.testReporter.textAttachment(this.report, 'GetStatsSummary', JSON.stringify(summaryStats, null, 4), "json");
} catch (error) {
console.log(error);
throw new KiteTestError(Status.BROKEN, "Failed to getStats");
}
}
}

module.exports = GetStatsStep;`

In my web app console peerConnections are appearing here:
image

In main page:
`const getPeerConnectionScript = function() {
return "window.peerConnections = peerConnections[0];";

async getStats(stepInfo) {
await stepInfo.driver.executeScript(getPeerConnectionScript());
let stats = await TestUtils.getStats(stepInfo, 'kite', stepInfo.peerConnections[0]);
return stats;
}
}`

config file:
"getStats" : { "enabled": true, "statsCollectionTime": 2, "statsCollectionInterval": 1, "peerConnections": ["window.peerConnections[0];"], "selectedStats": [ "inbound-rtp", "outbound-rtp", "candidate-pair" , "ontrack"] },

testScript:
if (this.getStats) { let getStatsStep = new GetStatsStep(this); await getStatsStep.execute(this); }

In my console there is this message:
image

In allure report:
image

How is possible to fix computePacketLoss ?

How to compile and run KITE test in Linux ?

Im about to start writing KITE tests in Linux. This is the Dockerfile i created:

FROM ubuntu as KiteBase

RUN apt update
RUN apt install -y default-jre default-jdk openjdk-8-jdk maven git gcc build-essential
RUN git clone https://github.com/webrtc/KITE.git KITE

WORKDIR /KITE/scripts/linux

RUN chmod +x *.sh ./setupLocalGrid.sh

COPY ./utils/google-chrome.list /etc/apt/sources.list.d/google-chrome.list

RUN apt install wget -y
RUN wget https://dl.google.com/linux/linux_signing_key.pub
RUN apt-key add linux_signing_key.pub
RUN apt update
RUN apt install google-chrome-stable -y
RUN apt install npm nodejs -y
RUN nodejs -v

ENV KITE_HOME=/KITE
ENV MAVEN_HOME =/usr/share/maven
ENV JAVA_HOME =/usr/share/Java

FROM KiteBase

COPY ./scripts/linux/setupLocalGrid.sh .

COPY ./KITE-Example-Test .

I am able to create the localgrid in linux like this:

image

Im able to go into the project folder like in the picture below :

image

Now I'm asking if i should at first compile the project and then run it ?! If yes, how can I do the compiling and running the project, because the commands provided in this tutorial are not working :

image

Thanks!

Create a multi-party test

Support connections with multiple browsers at a time. A simple test with meet.jit.si can be helpful.

README.md doesn't explain what "mvn" is

The README.md says that one should do "mvn clean install", but I don't see where the "mvn" command is supposed to come from. Not on my site (which uses OpenJDK 1.8 for its java).

README.md and Wiki instructions overlap

With something as complex as install instructions, if you write it in 2 places, they are going to get out of sync.

The advantage of having them in README.md is that it's version controlled together with the source. The Wiki has its own changelog.

Is it possible to have the instructions sourced in one place (like having an #include on the wiki, or putting "see Wiki" into README.md) rather than duplicating the text?

Provide support of Firefox for Android in KITE

KITE needs to have support of Firefox (Fennec) for Android:

Only custom built firefox debug build can be used since marionette is not enabled for firefox in release builds from mozilla.

Save logs in database

Im getting webrtc stats in this way :

"getStats": {
"enabled": true,
"statsCollectionTime": 2,
"statsCollectionInterval": 1,
"peerConnections": [ "window.peerConnections[0]" ],
"selectedStats": [ "inbound-rtp", "outbound-rtp", "candidate-pair",
"local-candidate" , "remote-candidate" ,"stream","peer-connection","codec","track" , "transport"
]
}
}

And im getting logs and other reports generated after test execution . I want to know is there a way how can I store those logs/allure reports directly to a database or a server , or they can be saved only locally ?

Set-up a SE Grid

A grid of selenium nodes and hub which gives access to all the relevant browser/version/OS configurations, which are:

  • Firefox and Chrome versions should run on: Windows 10, MacOS X 10.13 and Linux Ubuntu 12.
  • Edge should run on Win10.
  • Safari on MacOSX 10.13.

Data channel testing

Hey everyone. Thanks for the presentation earlier. Sadly, the sound was cut off a lot, so it was very hard to follow you.

As part of my master thesis, I'm going to test (SCTP-based) data channel implementations. However, only a fraction of those tests will be made for the WebRTC JS API. Some things aren't testable on that level, for example abandoning a partially sent message on an unreliable channel. This will require being able to inject packets at SCTP level (so, on top of ICE/DTLS).

My idea is to use RAWRTC for that purpose as it allows to inject arbitrary packets on top of ICE/DTLS easily and can talk to any other WebRTC implementation. In combination with the SCTP test tool (stt), this would allow to inject a sequence of SCTP packets and make those tests possible.

My main questions are the following:

  1. Is this something that's possible to do with KITE's architecture?
  2. I would also like to add performance tests (including tests with delay, etc.) but I'm unsure whether this fits into KITE's architecture.
  3. What components would I have to look at to get started?

Can you run all test cases you have in config folder, with one command ?

In my case I have three tests in config folder like this:

If you want to run first test you just go to folder which is your test and type: r config\js.yourfirsttest.json
and for the second test: r config\js.yoursecondtest.json

But I want to run all the tests with one command, is that possible in KITE ?

How to run KITE test in Docker Swarm ?

I have installed KITE locally, and I can run KITE tests from hub to nodes (different machines, same network) by this configuration:
Config file of the project:
{
"name": "MessengerLogin %ts",
"grids": [
{

  "type": "local",

   "url": "http://10.0.0.71:4444/wd/hub"
}.......
   }
  }
}

],
"clients": [
{
"browserName": "chrome",
"PLATFORM" : "LINUX"

}

Hub configuration:
@echo off
setlocal
title Hub
java -jar ../selenium.jar -role hub --debug -host ipAddress
endlocal
pause

Node configuration:
java -Dwebdriver.chrome.driver=./chromedriver.exe -jar ../selenium.jar -role node -maxSession 10 -port xyz -host ipAddress -hub http://ipAddress:port/grid/register -browser browserName=chrome,maxInstances=10 --debug

Now I need to do same work but through Docker Swarm (not locally) https://prnt.sc/psly63 . So , I am able to create grid through yml file in swarm:
version: "3.7"

networks:
main:
driver: overlay
services:
hub:
image: selenium/hub
ports:
- "4444:4444"
networks:
- main
deploy:
mode: replicated
replicas: 1
labels:
selenium.grid.type: "hub"
selenium.grid.hub: "true"
restart_policy:
condition: none
placement:
constraints: [node.role == worker]
chrome:
image: selenium/node-chrome-debug
entrypoint: >
bash -c '
export IP_ADDRESS=$$HOSTNAME &&
SE_OPTS="-host $$IP_ADDRESS" /opt/bin/entry_point.sh'
volumes:
- /dev/urandom:/dev/random
- /dev/shm:/dev/shm
environment:
HUB_PORT_4444_TCP_ADDR: hub
HUB_PORT_4444_TCP_PORT: 4444
NODE_MAX_SESSION: 1
networks:
- main
deploy:
mode: replicated
replicas: 3
labels:
selenium.grid.type: "node"
selenium.grid.node: "true"
selenium.grid.node.type: "chrome"
restart_policy:
condition: none
placement:
constraints: [node.role == worker]
firefox:
image: selenium/node-firefox
entrypoint: >
bash -c '
export IP_ADDRESS=$$HOSTNAME &&
SE_OPTS="-host $$IP_ADDRESS" /opt/bin/entry_point.sh'
volumes:
- /dev/shm:/dev/shm
- /dev/urandom:/dev/random
environment:
HUB_PORT_4444_TCP_ADDR: hub
HUB_PORT_4444_TCP_PORT: 4444
NODE_MAX_SESSION: 1
networks:
- main
depends_on:
- hub
deploy:
mode: replicated
replicas: 3
labels:
selenium.grid.type: "node"
selenium.grid.node: "true"
selenium.grid.node.type: "firefox"
restart_policy:
condition: none
placement:
constraints: [node.role == worker]

Now, my question is how can i integrated KITE tests to be run in swarm, cuz when i hit run https://prnt.sc/psm609 , it shows me this https://prnt.sc/psm6l5

Built a scheduler inside KITE

At this moment, KITE is a single run application. It would be nice to have a scheduler built inside KITE so that it can be scheduled to run after an interval specified in the config file.

getting UnableToCreateProfileException for firefox v70

Hi, I am getting the below Error.

2019-11-11 10:58:05,943 ERROR - org.openqa.selenium.firefox.UnableToCreateProfileException: Given model profile directory does not exist: D:\Join_Kite\KITE\third_party\windows
Driver info: driver.version: unknown
at org.openqa.selenium.firefox.FirefoxProfile.verifyModel(FirefoxProfile.java:169)
at org.openqa.selenium.firefox.FirefoxProfile.(FirefoxProfile.java:85)
at org.openqa.selenium.firefox.FirefoxProfile.(FirefoxProfile.java:72)
at org.webrtc.kite.WebDriverFactory.setCommonFirefoxOptions(WebDriverFactory.java:367)
at org.webrtc.kite.WebDriverFactory.buildBrowserCapabilities(WebDriverFactory.java:128)
at org.webrtc.kite.WebDriverFactory.createCapabilities(WebDriverFactory.java:183)
at org.webrtc.kite.WebDriverFactory.createWebDriver(WebDriverFactory.java:220)
at org.webrtc.kite.config.client.Client.createWebDriver(Client.java:893)
at org.webrtc.kite.tests.TestRunner.(TestRunner.java:56)
at org.webrtc.kite.tests.KiteBaseTest.createTestRunners(KiteBaseTest.java:90)
at org.webrtc.kite.tests.KiteBaseTest.init(KiteBaseTest.java:168)
at org.webrtc.kite.tests.KiteBaseTest.execute(KiteBaseTest.java:120)
at org.webrtc.kite.TestManager.call(TestManager.java:196)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Get call duration miliseconds

In config file i set "duration" : 900000 ( 15min) , and this is the check code for getting the call duration miliseconds :

const {TestUtils, TestStep, Status, KiteTestError} = require('kite-common');

/**

  • Class: PeerConnectionCheck
  • Extends: TestStep
  • Description:
    */
    class CallDurationCheck extends TestStep {
    constructor(kiteBaseTest) {
    super();
    this.driver = kiteBaseTest.driver;
    this.duration = kiteBaseTest.duration;
    this.page = kiteBaseTest.page;
    }

stepDescription() {
return "Call duration was " + this.time;
}

async step() {
// let state;
let time = 0;

while(time < this.duration)
 {

 /* state = await this.page.getIceConnectionState(this.driver);

  state = await this.page.getIceConnectionState(this.driver);

  if (state === "failed") {
    console.log("Call failed");
    throw new KiteTestError(Status.FAILED, "Call failed");
  }
  if (state === "connected" || state === "completed") {
    console.log('Success ! ' + 'State: ' + state);
    break;
  }*/

  // Every 1 milisecond
  await TestUtils.waitAround(1);
  time++;
  console.log(time);
  
}


/*if (time === this.duration) {
 // throw new KiteTestError(Status.FAILED, "Call failed (Time out)");
 console.log("Call duration was 15min");
}
else {
  console.log("Call duration was less than 15min");
}*/

}
}

module.exports = CallDurationCheck;

But, this i returning : Call duration was undefined . Can you help me resolve this ?

Apple issue: reusing PC

It might be interesting to test, if not already covered, reusing the same peer connection over and over.

error running jitsiTutorial

when I try to run jitsiTutorial I've recived this message error

image

Any idea to solve it???

I've compiled with maven and jdk 11

image

Best regards
Emilio

I need support for connecting parallel remote nodes using kite

I got node connected with a hub and I can run tests from hub to connected nodes (different machines ) one by one, but only with a single user. I need help how to login with different users on different nodes and run these test in parallel nodes, example: in node with port 8888 login with x user and join a call , while in same time in node with port 9999 login with y user and join the call.

This is the config file :

{
"name": "",
"grids": [
{
"type": "local",
"url": "http://10.0.3.233:4444/wd/hub"
}
],
"tests": [
{
"name": "",
"tupleSize": 1,
"description": "",
"testImpl": "Test.js",
"payload" : {
"url":"https://messenger.developershub.info/login",
"url1":"https://messenger.developershub.info/test/room",
"user" :
{
//here should be multiple usernames and passwords
"username": "[email protected]",
"password": "123456"
}
}
}

],
"clients": [
{
"browserName": "chrome"

}

]
}

And this is the Login step.The scenario is like this : the user logs in with his own address and then redirects/joins the call link:

const { TestStep, TestUtils } = require('kite-common');
class LoginStep extends TestStep {
constructor(kiteBaseTest) {
super();
this.driver = kiteBaseTest.driver;
this.timeout = kiteBaseTest.timeout;
this.url = kiteBaseTest.payload.url;
this.url1 = kiteBaseTest.payload.url1;
this.uuid = kiteBaseTest.uuid;
this.page = kiteBaseTest.page;
this.id = kiteBaseTest.id;
this.user = kiteBaseTest.payload.user.username;
this.pass = kiteBaseTest.payload.user.password;
}

stepDescription() {
    return 'Login at: ' + this.url + ' as guest: ' +  this.user;
}
async step() {
    
    await this.page.open(this);
    await this.page.enterEmail(this.user);
    await this.page.enterPassword(this.pass);
}

}

module.exports = LoginStep;

"mvn install" fails NoAdapter test

Version:
commit accd369
Merge: d552ca0 cc4300c
Author: Jose M Recio [email protected]
Date: Fri Jan 19 12:14:26 2018 +0800

Reproduce:

mvn install

Results :

Tests in error:
org.webrtc.kite.NoAdapterTestTest#testTestScript WebDriverException Reached er...

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] kite-if ............................................ SUCCESS [ 1.018 s]
[INFO] kite ............................................... SUCCESS [ 5.500 s]
[INFO] apprtc-test ........................................ SUCCESS [ 20.336 s]
[INFO] get-update ......................................... SUCCESS [ 30.006 s]
[INFO] jitsi-test ......................................... SUCCESS [ 33.206 s]
[INFO] noadapter-test ..................................... FAILURE [ 8.729 s]
[INFO] kiteweb ............................................ SKIPPED
[INFO] kite-base .......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:38 min
[INFO] Finished at: 2018-01-30T09:10:17+01:00
[INFO] Final Memory: 86M/286M
[INFO] ------------------------------------------------------------------------

Support for GetStats()

Implement a test with getStats(), collecting different performance metrics, and plot result over time.

Made version and platform mandatory for Browser object

A non-mobile Browser object in config is represented by its name, version and platform from which version and platform are optional.

It is a good idea to make all the three fields mandatory to avoid confusing the hub since there exists mobile browsers with the same configuration.

Passing an argument to chrome

I try to start a chrome node on the remote Linux server.
in order to run chrome on Linux server, chrome needs to pass the argument --no-sandbox.
how can this argument be passed?

Compilation error on Java 9

After installing Oracle Java 9 on an Ubuntu machine, the following error happened when running "mvn clean install":

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:testCompile (default-testCompile) on project apprtc-test: Compilation failure: Compilation failure:
[ERROR] /home/hta/code/kite/KITE-AppRTC-Test/src/test/java/org/webrtc/kite/IceConnectionTestTest.java:[23,23] package junit.framework does not exist
[ERROR] /home/hta/code/kite/KITE-AppRTC-Test/src/test/java/org/webrtc/kite/IceConnectionTestTest.java:[25,44] cannot find symbol
[ERROR] symbol: class TestCase
[ERROR] /home/hta/code/kite/KITE-AppRTC-Test/src/test/java/org/webrtc/kite/IceConnectionTestTest.java:[33,5] cannot find symbol
[ERROR] symbol: variable super
[ERROR] location: class org.webrtc.kite.IceConnectionTestTest

Missing dependency or required preinstall?
(junit is installed)

Apple request: mute options

There are some difference of behaviors between browsers related to muting tracks, adding tests there might be useful too.

How can i get call duration with KITE?

This is the JoinMeetingStep , from which i get the date and time when each participant joins the conference :const {TestStep, TestUtils, KiteTestError, Status} = require('kite-common');

class MeetingStep extends TestStep {

constructor(kiteBaseTest) {
super();
this.driver = kiteBaseTest.driver;
this.timeout = kiteBaseTest.timeout;

this.url = kiteBaseTest.payload.url1;
this.uuid = kiteBaseTest.uuid;
this.page = kiteBaseTest.page;

this.statsCollectionInterval = kiteBaseTest.statsCollectionInterval;
 this.selectedStats = kiteBaseTest.selectedStats;
 this.peerConnections = kiteBaseTest.peerConnections;
 this.testReporter = kiteBaseTest.reporter;
 this.id = kiteBaseTest.id;
 this.user = kiteBaseTest.payload.users[this.id].user;
 this.pass = kiteBaseTest.payload.users[this.id].pass;
 this.statsCollectionTime = kiteBaseTest.statsCollectionTime;

}
stepDescription() {
return 'Join a meeting room as guest ' + this.user + ' in: ' + this.url + ' at ' + Date();
}
async step() {

await this.page.open(this);
await this.page.hitLogin();

}
}

module.exports = MeetingStep;

Now, i have these issues:
1.How can i set for a call to have a fixed duration of 15minutes;
2.If a participant ends the call , how can i know the time and date when he leaved the call

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.