How to Setup Selenium Grid for Jitsi Malleus Test

Written by: Bagus Facsi Aginsa
Published at: 17 May 2020


This tutorial is for creating selenium grid (hub & node) for jitsi-meet testing. This is very helpfull if you want to test how much participant your setup can handle.

Sudo Privileges

Before start we have to get sudo privileges so there are no permission issue in our installation step.

sudo su

Install Docker

update package list

apt update

install a few prerequisite packages

apt install apt-transport-https ca-certificates curl software-properties-common

install docker packages

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
apt update
apt install docker-ce

add your user to docker group

usermod -aG docker <username>

Install Docker Compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Create Selenium Grid

create docker compose file in any folder you like

nano docker-compose.yaml

copy-paste this script:

version: "3"
services:
  selenium-hub:
    image: selenium/hub:3.141.59
    container_name: selenium-hub
    ports:
      - "4444:4444"

  node1:
    image: selenium/node-chrome:3.141.59
    container_name: chrome-node-1
    volumes:
      - /dev/shm:/dev/shm
      - /usr/share/jitsi-meet-torture/resources:/usr/share/jitsi-meet-torture/resources
    depends_on:
      - selenium-hub
    environment:
      - HUB_HOST=selenium-hub
      - HUB_PORT=4444
      - NODE_MAX_INSTANCES=2
      - NODE_MAX_SESSION=2

  node2:
    image: selenium/node-chrome:3.141.59
    container_name: chrome-node-2
    volumes:
      - /dev/shm:/dev/shm
      - /usr/share/jitsi-meet-torture/resources:/usr/share/jitsi-meet-torture/resources
    depends_on:
      - selenium-hub
    environment:
      - HUB_HOST=selenium-hub
      - HUB_PORT=4444
      - NODE_MAX_INSTANCES=2
      - NODE_MAX_SESSION=2

This config is only for 4 people concurrent video call. You can raise the number by adding more NODE_MAX_INSTANCES & NODE_MAX_SESSION parameter, or add more node with same configuration (just copy-paste node2 and name it node3, 4, etc.).

on the same folder, run the docker compose

docker-compose up -d

finally, place your video under /usr/share/jitsi-meet-torture/resources

done!

Setup Testing

In your computer or other server, you can setup your testing script and hit the selenium hub to scale the test.

Install java-jdk & maven

apt update && apt install default-jdk maven

clone jitsi torture opensource project

git clone https://github.com/jitsi/jitsi-meet-torture.git

run your test

cd jitsi-meet-torture
./scripts/malleus.sh --conferences=1 --participants=4 --senders=1 --audio-senders=2 --duration=120 --room-name-prefix=hammertesting --hub-url=http://<your-selenium-hub-url>:4444/wd/hub --instance-url=https://<your-jitsi-url>