QA/Execution/Web Testing/Automation/Jenkins

From MozillaWiki
Jump to: navigation, search


Jenkins CI is used by Web QA to run automated tests. The production instance is publicly accessible and can be found here. Details of the setup and administration are available on our internal Mana page. We also have a staging instance for adhoc jobs and experimentation. This is secured behind Mozilla VPN, and can be found here. Documentation for the staging instance is also available on Mana.


Below is a list of plugins in use (dependencies have been omitted):

Global Environment Variables

Several environment variables are configured:

  • DEFAULT_FIREFOX_VERSION - The default Firefox version to use. The default should be the latest compatible version.
  • PIP_DOWNLOAD_CACHE - Cache PIP downloads. The default is ${HOME}/.pip_download_cache.
  • PIP_INDEX_URL - Sets the PyPI index URL. The default is empty, to use the main PyPI index.
  • PIP_USE_MIRRORS - Controls use of the PyPI mirrors. By default this is false to speed up PIP installations.
  • PIP_VERBOSE - Controls the verbosity of PIP output. By default this is false and useful to enable for debugging.
  • PYTEST_ADDOPTS - Add py.test options to all jobs. The default is -r=fsxXR --verbose --tb=short.
  • PYTEST_PROCESSES_MAC - Number of parallel py.test processes to use on Mac nodes.
  • PYTEST_PROCESSES_SAUCE - Number of parallel py.test processes to use on SauceLabs jobs.
  • PYTEST_PROCESSES_WINDOWS - Number of parallel py.test processes to use on Windows nodes.
  • PYTEST_RERUNS - Number of times to rerun a failed test (used by pytest-rerunfailures). The default is 5.
  • PYTEST_TIMEOUT - Timeout (in seconds) for each test (used by pytest-timeout). The default is 300 (5 minutes).
  • SAUCE_CAPABILITIES - Single capability to set for all desktop Sauc Labs jobs.
  • SAUCE_CAPABILITIES_MOBILE - Single capability to set for all mobile SauceLabs jobs.
  • SAUCE_FIREFOX_VERSION_MAC - The default Firefox version to use for OS X SauceLabs jobs.
  • SAUCE_FIREFOX_VERSION_WINDOWS - The default Firefox version to use for Windows SauceLabs jobs.
  • SAUCE_MAC_VERSION - The default OS X version for SauceLabs jobs.
  • SAUCE_WINDOWS_VERSION - The default Windows version for SauceLabs jobs.
  • SAUCELABS_ANDROID_VERSION - The default Android version for SauceLabs jobs.
  • SAUCELABS_APPIUM_VERSION - The default Appium version for SauceLabs jobs.
  • SAUCELABS_SELENIUM_VERSION - The default Selenium version for SauceLabs jobs.
  • SAUCELABS_USERNAME - The default username to use for SauceLabs jobs.
  • SELENIUM_HOST - The host running the remote Selenium server or hub. The default is
  • TOX_TESTENV_PASSENV - Environment variables to pass down into Tox environments. The default is http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY SELENIUM_HOST SAUCELABS_USERNAME SAUCELABS_API_KEY.

Known Issues

  • None


Try enabling verbose PIP output to determine if installation of Python packages is causing issues.

PIP index is unavailable

We use the main PyPI (Python Package Index) for installing Python packages. If this experiences issues then we can enable use of PIP mirrors.

PIP installation is slow

If Python packages are slow to install you should check that PIP mirrors are not enabled. If not, it may be that the main PyPI mirror is slow to respond.