Skip to main content

WebRTC python unit tests inspired to '80s

Project description

VideoDrone

How many connected users your favourite open source video conferencing solution can handle? That's the question that videodrone wants to answer. Empirically.

Videodrone tests popular WebRTC Platforms with Selenium HQ and Python, aiming to be a lightweight build system for load test orchestration.

At this moment only chrome driver was implemented and well tested on Debian based distributions, fill free to contribute with your "drone connector". See Drone Connectors for further informations.

Requirements:

  • python {36,37,38}
  • selenium
  • chromium web browser

Available drones:

You should know, that:

  • WebRTC needs a huge load, on a intel i7 processor you would start from 5 to 8 drones
  • hundreds of drones should be handled in a distribuited environment, a cluster of videodrones

Setup

Provide a fully working python3 pip environment, with virtualenv installed in. You can even use build.sh to build your videodrone project. example

Prepare environment

apt install python3-pip wget chromium unzip
pip3 install --upgrade pip
pip3 install virtualenv

wget https://raw.githubusercontent.com/peppelinux/videodrone/master/build.sh -O build.sh
bash build.sh VideoDrone

You can even install videodrone by hands.

mkdir VideoDrones && cd VideoDrones
virtualenv -ppython3 env && source env/bin/activate
pip install videodrone

Create the following directories before executing videodrone.

  • y4m, where your preferred y4m files resides. They will be used randomically.
    • mkdir y4ms
    • wget https://media.xiph.org/video/derf/y4m/students_cif.y4m -O y4ms/students_cif.y4m
  • drivers, where your selenium drivers resides.

Setup in LXC container

apt install lxc
CONTAINER_NAME=deb10
lxc-create -t download -n $CONTAINER_NAME -- -d debian -r buster -a armhf
lxc-start deb10
lxc-attach deb10

# then choose your preferred setup as show in the previous sections.

Docker Image

docker image build --tag videodrone .

# go in
# docker container run -it videodrone /bin/bash

# run the container with your preferred configuration
docker container run -dit -e VIDEODRONE_DRIVER=/usr/bin/chromedriver videodrone videodrone -room thatroom -c videodrone.drones.jitsi_chrome -y4m /VideoDrone/y4ms/ -lifetime 33 -n 4

Run

VIDEODRONE_DRIVER environment variable can override the default path, which is $VDPATH/drivers/chromedriver.

example, this connector is configured to create a single drone to "https://meet.jit.si/thatroom":

VIDEODRONE_DRIVER=/usr/bin/chromedriver videodrone -c "videodrone.drones.jitsi_chrome" -r thatroom -y4m ./y4ms/

There will be a party of 4 drones in "thatroom":

videodrone -room thatroom -c "videodrone.drones.edumeet_garr_chrome" -y4m ./y4ms/ -n 4

Output

INFO:__name__:Started drone <Process name='Process-1' pid=25900 parent=25898 started>
INFO:__name__:Started drone <Process name='Process-2' pid=25960 parent=25898 started>
INFO:__name__:Started drone <Process name='Process-3' pid=26155 parent=25898 started>
INFO:__name__:Started drone <Process name='Process-4' pid=26373 parent=25898 started>
INFO:__name__:Drone destroyed
INFO:__name__:Drone destroyed
INFO:__name__:Drone destroyed
INFO:__name__:Drone destroyed

What happens example

Another example with Garr BBB meet. headless set to false means that the browser will run in foreground.

./videodrone -c "videodrone.drones.bbbmeet_garr_chrome" -room "/b/roomname -pin thatpin -y4m y4ms/ -headless 0 -lifetime 27

Drone Connectors

Drone connectors are selenium browser macros, written in python, as simple as possibile. Drone connectors must be packaged and installed or included in your PYTHONPATH (sys.path). You can even create a python local package folder, in your VideoDrone Project.

See videodrone.drones.jitsi_chrome for example.

Credits

Fabio Farina (Garr Consortium), Massimo Carboni (Garr Consortium), Garrlab community.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

videodrone-0.9.0rc2.linux-x86_64.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

videodrone-0.9.0rc2-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file videodrone-0.9.0rc2.linux-x86_64.tar.gz.

File metadata

  • Download URL: videodrone-0.9.0rc2.linux-x86_64.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for videodrone-0.9.0rc2.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 448c53d570bcc9acc4456c77da4001fcf91364efd6bd396de370c0803e9aecb9
MD5 338a92478cf32e0bda26c5fa85be72ed
BLAKE2b-256 04543c4efc69c8e6aff3ab1169f9226db8d5cf20c5dbc9cc7d20769149d4c1c3

See more details on using hashes here.

File details

Details for the file videodrone-0.9.0rc2-py3-none-any.whl.

File metadata

  • Download URL: videodrone-0.9.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for videodrone-0.9.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 45e6f6a2a3510251177d8da780450cc3d320f7f3c96b8a397effb7393589dd4b
MD5 f805eba3901888308abe9916f2d12342
BLAKE2b-256 0b3836d9136d0e5a697a97bc0aa54e7dbdbba8548ea995d3bdbe2b3536f86649

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page