Skip to content

Instantly share code, notes, and snippets.

@facsiaginsa
Last active December 23, 2021 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save facsiaginsa/d5aa133cce332a7dc088dea8b28be66f to your computer and use it in GitHub Desktop.
Save facsiaginsa/d5aa133cce332a7dc088dea8b28be66f to your computer and use it in GitHub Desktop.
This tutorial is for creating selenium grid (hub & node) for jitsi-meet testing

How to Setup Selenium Grid for Jitsi Malleus Test

This tutorial is for creating selenium grid (hub & node) for jitsi-meet testing

Sudo Privileges

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

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>
@Karish-Thangarajah
Copy link

how does one configure this to run the jitsi-meet-torture script where the selenium hub is in a virtual machine and the selenium nodes are in the host computer of the virtual machine with the selenium hub?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment