Framework for functional and Load Testing of WebRTC
- Install janus: https://github.com/meetecho/janus-gateway
- Install python utilities:
pip install psutil matplotlib
- Install chrome:
$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
$ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
$ sudo apt-get update
$ sudo apt-get install google-chrome-stable
- Download chromedriver from https://sites.google.com/a/chromium.org/chromedriver/downloads
- Install selenium:
pip install selenium
- Install pytest:
pip install pytest pytest-xdist pytest-rerunfailures
- on CentOS
# psmon.sh
import sys
import pmm
import matplotlib
matplotlib.use('Agg')
if __name__ == '__main__':
sys.exit(pmm.main())
$ psmon.sh <PID> --log <FILENAME> --plot <FILENAME> --interval <SECS> --duration <SECS>
- on Ubuntu
# webtest.py
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('headless')
options.add_argument('window-size=1280x720')
options.add_argument("disable-gpu")
options.add_argument('no-sandbox')
options.add_argument("use-fake-device-for-media-stream");
options.add_argument("use-fake-ui-for-media-stream");
driver = webdriver.Chrome(<CHROMEDRIVER_PATH>, chrome_options=options)
driver.get(<URL>)
driver.implicitly_wait(30)
driver.find_element_by_id("start").click()
#driver.quit()
$ py.test -n <numprocesses> webtest.py
- Terminate process with <CTRL+C> on CentOS
- Log files generation and test results recording