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

no edit summary
No edit summary
Line 5: Line 5:


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


     cd ~/moz-grid-config
     cd ~/moz-grid-config
Line 12: Line 11:


=== Starting nodes ===
=== Starting nodes ===
# Connect to the appropriate machine.
Connect to the appropriate machine, and execute the following from a terminal (you can use SSH or VNC):
# From a terminal (you can use SSH, VNC, or Screen):


     cd ~/moz-grid-config
     cd ~/moz-grid-config
     ant launch-node
     ant launch-node
=== Registering mobile devices ===
There is a cron job that runs every hour on qa-selenium.mv.mozilla.com to register the known devices. The contents of the crontab is below. This can be created or edited using <code>crontab -e</code> from a terminal.
    MAILTO=""
    @hourly  /Users/webqa/moz-grid-config/flynnid.sh
After restarting the Selenium Grid hub you may wish to manually register the known devices. You can do this from anyway as long as you:
* Are on the VPN.
* Have FlynnID installed.
* Have cloned moz-grid-config.
To manually register the known devices execute the following from a terminal:
    cd ~/moz-grid-config
    flynnid flynnid.json
If you wish to register other devices you will need to create a configuration file to describe them.


=== Shutdown ===
=== Shutdown ===
* Terminate the process using CTRL+C
Terminate the process using CTRL+C


=== Architecture  ===
=== Architecture  ===
Line 113: Line 129:


===== Mac OS X =====
===== Mac OS X =====
* <code>mozdownload -v 14.0.1 -d /tmp</code>
From a terminal:
* <code>mozinstall -d /Applications/ /tmp/firefox-14.0.1.en-US.mac.dmg</code>
 
* <code>mv /Applications/Firefox.app/ "/Applications/Firefox 14.app/"</code>
    mozdownload -v 14.0.1 -d /tmp
* <code>rm /tmp/firefox-14.0.1.en-US.mac.dmg</code>
    mozinstall -d /Applications/ /tmp/firefox-14.0.1.en-US.mac.dmg
    mv /Applications/Firefox.app/ "/Applications/Firefox 14.app/"
    rm /tmp/firefox-14.0.1.en-US.mac.dmg


===== Windows =====
===== Windows =====
* <code>mozdownload -v 14.0.1 -d %TMP%</code>
From a command prompt:
* <code>mozinstall -d %USERPROFILE% %TMP%\firefox-14.0.1.en-US.win32.exe</code>
 
* <code>move %USERPROFILE%/firefox-14 "\Program Files\Mozilla Firefox 14"</code>
    mozdownload -v 14.0.1 -d %TMP%
* <code>del %TMP%\firefox-14.0.1.en-US.win32.exe</code>
    mozinstall -d %USERPROFILE% %TMP%\firefox-14.0.1.en-US.win32.exe
    move %USERPROFILE%/firefox-14 "\Program Files\Mozilla Firefox 14"
    del %TMP%\firefox-14.0.1.en-US.win32.exe


== Setting hostname on Mac OS X ==
== Setting hostname on Mac OS X ==
Line 144: Line 164:


The output will display the FQDN of the computer.
The output will display the FQDN of the computer.
===Registering the  Tegra  Board to the Selenium Grid===
Install and  open the [http://code.google.com/p/selenium/downloads/list WebDriver] Android (android-server-x.xx.apk where x.xx is current version)  application on the Tegra board.
Install the [https://github.com/davehunt/flynnid FlynnID] python package on your computer.
Open your terminal and  type the following command
  flynnid --hubhost=[HUBIP] --hubport=4444 --nodehost=[NODEIP] --nodeport=8080 --browsername=browser --platform=ANDROID
where  HUBIP is the hostname or IP address of the Selenium Grid  and NODEIP is the hostname or IP address of the Tegra board
If everything goes right, you should see
  Registering the node to hub: http://qa-selenium.mv.mozilla.com:4444/grid/register
  Success!
You can check to see if the node is running by visiting the following url in your browser
  http://[NODEIP]:[NODEPORT]/wd/hub/static/resource/hub.html
where NODEIP is the hostname or IP address of the Tegra board and NODEPORT is the port the node is listening, the default is 8080.


== References ==
== References ==
Confirmed users
2,196

edits