QA/Execution/Web Testing/Automation/Selenium Grid: Difference between revisions

Line 5: Line 5:


=== Starting the hub ===
=== Starting the hub ===
First, connect to qa-selenium.mv.mozilla.com. Then from a terminal (you can use SSH, VNC, or Screen):
# Connect to qa-selenium.mv.mozilla.com
# From a terminal (you can use SSH, VNC, or Screen):


     cd ~/moz-grid-config
     cd ~/moz-grid-config
     ant launch-hub
     ant launch-hub


=== Starting Selenium node ===
=== Starting nodes ===
* VNC into or use Screen, and go to each individual node,
# Connect to the appropriate machine.
* start a screen session -> screen -S selenium_rc
# From a terminal (you can use SSH, VNC, or Screen):
* cd moz-grid-config
 
* start the node -> ant launch-node
    cd ~/moz-grid-config
    ant launch-node
 
=== Shutdown ===
=== Shutdown ===
* Use <control> c
* Terminate the process using <control>+c


=== Architecture  ===
=== Architecture  ===
* '''qa-selenium'''.mv.mozilla.com (10.250.1.143)
** Mac Mini; 2.66 Ghz Intel Core 2 Duo; 8 GB
** Mac OS X 10.6.8
** Jenkins ([http://qa-selenium.mv.mozilla.com:8080/ dashboard])
** Selenium Grid hub ([http://qa-selenium.mv.mozilla.com:4444/grid/console console])
* '''qa-selenium2'''.mv.mozilla.com (10.250.1.167) -- '''NO LONGER USED'''
* '''qa-selenium3'''.mv.mozilla.com (10.250.1.196)
** Mac Mini; 2.4 Ghz Intel Core 2 Duo; 4 GB
** Mac OS X 10.6.8
** VM: Windows 7 Professional (10.250.7.78)
* '''qa-selenium4'''.mv.mozilla.com (10.250.1.197)
** Mac Mini; 2.4 Ghz Intel Core 2 Duo; 4 GB
** Mac OS X 10.6.8
** VM: Windows 7 Professional (10.250.4.68)
* '''qa-selenium5'''.mv.mozilla.com (10.250.1.222)
** Mac Mini; 2.66 Ghz Intel Core 2 Duo; 8 GB
** Mac OS X 10.6.8
** VM: Windows 7 Professional (10.250.5.71)
* '''qa-selenium6'''.mv.mozilla.com (10.250.1.221)
** Mac Mini; 2.53 Ghz Intel Core 2 Duo; 4 GB
** Mac OS X 10.6.8
** VM: Windows 7 Professional (10.250.2.244)
* '''qa-selenium7'''.mv.mozilla.com (10.250.1.9)
We have several Mac Minis running Selenium nodes, integrated via Jenkins Continuous Build Integration and Selenium Grid. All machines can be VNC'ed into from within the MV-Office Intranet (VPN if offsite). In order to start the entire system (Jenkins, Selenium Grid, and all VMs with Selenium RCs), ensure that all the Mac Minis are powered on and logged in.
=== Node configuration ===
Since Selenium 2.14.0 was released and allowed both RC and WebDriver nodes to co-exist each node runs the same configuration of browser nodes.


*'''qa-selenium'''.mv.mozilla.com (10.250.1.143)
==== Firefox version policy ====
**Mac Mini; 2.66 Ghz Intel Core 2 Duo; 8 GB
Due to rapid release, we have adopted the following policy for Firefox versions available on our Selenium infrastructure:
**Mac OS X 10.6.8
* Nightly
**Jenkins (http://qa-selenium.mv.mozilla.com:8080/)
* Aurora
**Selenium Grid Hub (http://qa-selenium.mv.mozilla.com:4444/grid/console)
* Beta
*'''qa-selenium2'''.mv.mozilla.com (10.250.1.167) -- '''NO LONGER USED'''
* Currently supported Firefox release(s)
*'''qa-selenium3'''.mv.mozilla.com (10.250.1.196)
* One previous major Firefox release
**Mac Mini; 2.4 Ghz Intel Core 2 Duo; 4 GB
**Mac OS X 10.6.8
**VM: Windows 7 Professional (10.250.7.78)
*'''qa-selenium4'''.mv.mozilla.com (10.250.1.197)
**Mac Mini; 2.4 Ghz Intel Core 2 Duo; 4 GB
**Mac OS X 10.6.8
**VM: Windows 7 Professional (10.250.4.68)
*'''qa-selenium5'''.mv.mozilla.com (10.250.1.222)
**Mac Mini; 2.66 Ghz Intel Core 2 Duo; 8 GB
**Mac OS X 10.6.8
**VM: Windows 7 Professional (10.250.5.71)
*'''qa-selenium6'''.mv.mozilla.com (10.250.1.221)
**Mac Mini; 2.53 Ghz Intel Core 2 Duo; 4 GB
**Mac OS X 10.6.8
**VM: Windows 7 Professional (10.250.2.244)
*'''qa-selenium7'''.mv.mozilla.com (10.250.1.9)


We have several Mac Minis running various Selenium RC environments, integrated via Jenkins Continuous Build Integration and Selenium Grid. All machines can be VNC'ed into from within the MV-Office Intranet (VPN if offsite). In order to start the entire system (Jenkins, Selenium Grid, and all VMs with Selenium RCs), ensure that all the Mac Minis are powered on and logged in.
==== Selenium RC ====
* Firefox 3.6 (x5)
* Firefox 7 (x5) - to be removed
* Firefox 8 (x5)
* Firefox 9 (x5)
* Firefox Beta (x5)
* Aurora (x5)
* Nightly (x5)
* Internet Explorer 8 (x1)


=== Node configuation ===
==== WebDriver ====
Since Selenium Grid 2.14.0 was released and allowed both RC and Webdriver nodes to co-exist each node runs the same configuation of browser nodes
Instances are currently set to 1 due to issues with focus.


==== For both Mac and Win7 nodes ====
* Firefox 3.6 (x1)
Selenium RC
* Firefox 7 (x1) - to be removed
* Firefox 3.6 - 5 instances
* Firefox 8 (x1)
* Firefox 4 - 5 instances
* Firefox 9 (x1)
* Firefox 5 - 5 instances
* Firefox Beta (x1)
* Firefox 6 - 5 instances
* Aurora (x1)
* Firefox 7 - 5 instances
* Nightly (x1)
* Firefox Beta - 5 instances
* Internet Explorer 8 (x1)
* Firefox Aurora - 5 instances
* Firefox Nightly - 5 instances
* Internet Explorer 8 - 1 instance
WebDriver
* Firefox 3.6 - 1 instance
* Firefox 4 - 1 instance
* Firefox 5 - 1 instance
* Firefox 6 - 1 instance
* Firefox 7 - 1 instance
* Firefox Beta - 1 instance
* Firefox Aurora - 1 instance
* Firefox Nightly - 1 instance
* Internet Explorer 8 - 1 instance


=== Adding a new browser environment ===
=== Adding a new browser environment ===
==== In the moz-grid-config repository ====
* https://github.com/mozilla/moz-grid-config/blob/master
* Add the browser, alias, and path to grid_configuration.yml
* Add the browser, binary and details to win7.json and mac.json
* Make sure that the path to the binary is correct and includes the correct version number
* Submit the changes as a Git pull request for approval by the team.


==== On the node ====
==== Configuration ====
* The moz-grid-config project will already be configred on the node so the first step is to pull the new browser configuration files from the github master branch (as from step 5 above).
You will need to fork and clone from the [https://github.com/mozilla/moz-grid-config moz-grid-config github repository] and work on a new branch.
* You may also need to install the browser for the version you are adding to the grid. All new browsers should be installed with the version number in the path so that moz-grid-config can always find them!
 
* Download Firefox binaries: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/
# Add the browser, alias, and path to grid_configuration.yml
# Add the browser, binary and details to the JSON configuration files
# Submit a pull request to the main github repository from your branch
 
==== Hub/Nodes ====
# Prepare Jenkins for shutdown - this will allow all currently running jobs to finish, but will not start any new jobs.
# Once no jobs are running, shutdown the Selenium Grid hub
# Pull in the latest changes from moz-grid-config
# Start the Selenium Grid hub
# For each Selenium node:
## Shutdown the Selenium node
## Pull in the latest changes from moz-grid-config
## Install the appropriate browser for the new environment
## Start the Selenium node
 
==== Installing Firefox ====
* All new browsers should be installed with the version number in the path so that moz-grid-config can always find them!
* Download Firefox binaries from http://releases.mozilla.org/pub/mozilla.org/firefox/releases/


===== Installing Firefox on a Mac node =====
===== Mac OS X =====
* Unpack the Firefox version to the desktop
# Download the appropriate DMG file
* Rename the file to include the version number (eg 'Firefox 10.app')
# Open the disc image (DMG) and drag Firefox to the desktop
* Move the file from the desktop into the Application folder
# Rename Firefox to include the version number (e.g. 'Firefox 10.app')
* No other changes are necessary - Selenium will manage the configuration and profile
# Move the file from the desktop into the Application folder


===== Installing Firefox on a Win 7 node =====
===== Windows =====
* Run the Firefox installer and choose custom install
# Download the appropriate MSI file
* Change the default install path to include the version number (eg 'C:\Program Files\Mozilla Firefox 10\')
# Run the Firefox installer and select custom install
* Complete the install and uncheck 'set as default browser'  
# Change the default install path to include the version number (e.g. 'C:\Program Files\Mozilla Firefox 10\')
* No other changes are necessary - Selenium will manage the configuration and profile
# Complete the install and uncheck 'set as default browser'


== Jenkins ==
== Jenkins ==
Confirmed users
2,177

edits