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

 
(4 intermediate revisions by 2 users not shown)
Line 4: Line 4:
= Plugins =
= Plugins =
Below is a list of plugins in use (dependencies have been omitted):
Below is a list of plugins in use (dependencies have been omitted):
* [https://wiki.jenkins-ci.org/display/JENKINS/Build+Failure+Analyzer Build Failure Analyzer] - Helps collate build failures
* [https://wiki.jenkins-ci.org/display/JENKINS/Build+Monitor+Plugin Build Monitor] - Highly visible view of the status of selected jobs
* [https://wiki.jenkins-ci.org/display/JENKINS/Build+Monitor+Plugin Build Monitor] - Highly visible view of the status of selected jobs
* [http://wiki.jenkins-ci.org/display/JENKINS/Build-timeout+Plugin Build Timeout] - Allows users to take responsibility for failed builds
* [http://wiki.jenkins-ci.org/display/JENKINS/Build-timeout+Plugin Build Timeout] - Allows users to take responsibility for failed builds
Line 32: 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'''.
* '''FIREFOX_VERSION''' - Firefox version to use. The default is '''47.0'''.
* '''MAC_VERSION''' - MacOS version to use. The default is '''OS X 10.11'''.
* '''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''' - Number of parallel py.test processes to use. The default is '''15'''.
* '''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).
* '''SAUCELABS_USERNAME''' - Username to use for [http://saucelabs.com/ Sauce Labs].
* '''SAUCE_CAPABILITIES''' - Single capability to set for all desktop [http://saucelabs.com/ Sauc Labs] jobs.
* '''SELENIUM_EXCLUDE_DEBUG''' - Exclude capturing these debug types from Selenium tests. The default is '''logs'''.
* '''SAUCE_CAPABILITIES_MOBILE''' - Single capability to set for all mobile [http://saucelabs.com/ SauceLabs] jobs.
* '''SELENIUM_VERSION''' - Selenium version to use. The default is '''2.53.1'''.
* '''SAUCE_FIREFOX_VERSION_MAC''' - The default Firefox version to use for OS X [http://saucelabs.com/ SauceLabs] jobs.
* '''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'''.
* '''SAUCE_FIREFOX_VERSION_WINDOWS''' - The default Firefox version to use for Windows [http://saucelabs.com/ SauceLabs] jobs.
* '''WINDOWS_VERSION''' - Windows version to use. The default is '''Windows 7'''.
* '''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.
* '''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_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'''.
* '''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'''.


= Known Issues =
= Known Issues =
* [https://issues.jenkins-ci.org/browse/JENKINS-28175 JENKINS-28175] - Config change deadlock Jenkins when pircx.shutdown() is invoked
* None


= Troubleshooting =
= Troubleshooting =

Latest revision as of 13:22, 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.
  • FIREFOX_VERSION - Firefox version to use. The default is 47.0.
  • MAC_VERSION - MacOS version to use. The default is OS X 10.11.
  • 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 - Number of parallel py.test processes to use. The default is 15.
  • PYTEST_RERUNS - Number of times to rerun a failed test (used by pytest-rerunfailures). The default is 5.
  • SAUCELABS_USERNAME - Username to use for Sauce Labs.
  • SELENIUM_EXCLUDE_DEBUG - Exclude capturing these debug types from Selenium tests. The default is logs.
  • SELENIUM_VERSION - Selenium version to use. The default is 2.53.1.
  • 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.
  • WINDOWS_VERSION - Windows version to use. The default is Windows 7.

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.