QA/Execution/Web Testing/Automation/Jenkins: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 33: Line 33:
Several environment variables are configured:
Several environment variables are configured:


* '''DEFAULT_FIREFOX_VERSION''' - The default Firefox version to use. The default should be the latest compatible version.
* '''APPIUM_BROWSER_NAME''' - Browser name to use with Appium. The default is '''Browser'''.
* '''PIP_DOWNLOAD_CACHE''' - Cache PIP downloads. The default is '''${HOME}/.pip_download_cache'''.
* '''APPIUM_DEVICE_NAME''' - Device name to use with Appium. The default is '''Android Emulator'''.
* '''APPIUM_PLATFORM_NAME''' - Platform name to use with Appium. The default is '''Android'''.
* '''APPIUM_PLATFORM_VERSION''' - Platform version to use with Appium. The default is '''5.1'''.
* '''APPIUM_VERSION''' - Version of Appium to use. The default is '''1.5.3'''.
* '''PIP_INDEX_URL''' - Sets the PyPI index URL. The default is empty, to use the main PyPI index.
* '''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_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.
* '''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_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 [http://saucelabs.com/ SauceLabs] jobs.
* '''PYTEST_PROCESSES_SAUCE''' - Number of parallel py.test processes to use on [http://saucelabs.com/ 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 [https://pypi.python.org/pypi/pytest-rerunfailures pytest-rerunfailures]). The default is '''5'''.
* '''PYTEST_RERUNS''' - Number of times to rerun a failed test (used by [https://pypi.python.org/pypi/pytest-rerunfailures pytest-rerunfailures]). The default is '''5'''.
* '''PYTEST_TIMEOUT''' - Timeout (in seconds) for each test (used by [https://pypi.python.org/pypi/pytest-timeout pytest-timeout]). The default is '''300''' (5 minutes).
* '''SAUCE_CAPABILITIES''' - Single capability to set for all desktop [http://saucelabs.com/ Sauc Labs] jobs.
* '''SAUCE_CAPABILITIES_MOBILE''' - Single capability to set for all mobile [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCE_FIREFOX_VERSION_MAC''' - The default Firefox version to use for OS X [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCE_FIREFOX_VERSION_MAC''' - The default Firefox version to use for OS X [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCE_FIREFOX_VERSION_WINDOWS''' - The default Firefox version to use for Windows [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCE_FIREFOX_VERSION_WINDOWS''' - The default Firefox version to use for Windows [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCE_MAC_VERSION''' - The default OS X version for [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCE_MAC_VERSION''' - The default OS X version for [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCE_WINDOWS_VERSION''' - The default Windows version for [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCE_WINDOWS_VERSION''' - The default Windows version for [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCELABS_ANDROID_VERSION''' - The default Android version for [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCELABS_APPIUM_VERSION''' - The default Appium version for [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCELABS_SELENIUM_VERSION''' - The default Selenium version for [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCELABS_SELENIUM_VERSION''' - The default Selenium version for [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCELABS_USERNAME''' - The default username to use for [http://saucelabs.com/ SauceLabs] jobs.
* '''SAUCELABS_USERNAME''' - The default username to use for [http://saucelabs.com/ SauceLabs] jobs.
* '''SELENIUM_HOST''' - The host running the remote Selenium server or hub. The default is '''selenium-hub1.qa.scl3.mozilla.com'''.
* '''SELENIUM_EXCLUDE_DEBUG''' - Exclude capturing these debug types from Selenium tests. The default is '''logs'''.
* '''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'''.
* '''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 SAUCELABS_USERNAME SAUCELABS_API_KEY'''.


= Known Issues =
= Known Issues =

Revision as of 12:59, 6 October 2016

Summary

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.

Plugins

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

Global Environment Variables

Several environment variables are configured:

  • APPIUM_BROWSER_NAME - Browser name to use with Appium. The default is Browser.
  • APPIUM_DEVICE_NAME - Device name to use with Appium. The default is Android Emulator.
  • APPIUM_PLATFORM_NAME - Platform name to use with Appium. The default is Android.
  • APPIUM_PLATFORM_VERSION - Platform version to use with Appium. The default is 5.1.
  • APPIUM_VERSION - Version of Appium to use. The default is 1.5.3.
  • 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_SAUCE - Number of parallel py.test processes to use on SauceLabs jobs.
  • PYTEST_RERUNS - Number of times to rerun a failed test (used by pytest-rerunfailures). The default is 5.
  • 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_SELENIUM_VERSION - The default Selenium version for SauceLabs jobs.
  • SAUCELABS_USERNAME - The default username to use for SauceLabs jobs.
  • SELENIUM_EXCLUDE_DEBUG - Exclude capturing these debug types from Selenium tests. The default is logs.
  • 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 SAUCELABS_USERNAME SAUCELABS_API_KEY.

Known Issues

  • None

Troubleshooting

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.