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

Jump to navigation Jump to search
Update steps to update Selenium
No edit summary
(Update steps to update Selenium)
Line 3: Line 3:


== Selenium Grid Hub ==
== Selenium Grid Hub ==
The Selenium Grid hub is running on a VM in our data-center. For setup and administration see our [https://mana.mozilla.org/wiki/display/QA/selenium-hub1.qa.scl3.mozilla.com internal Mana page].
The Selenium Grid hub is running on a VM in our data-center. For setup and administration see our [https://mana.mozilla.org/wiki/display/QA/selenium-hub1.qa.scl3.mozilla.com internal documentation]. We also have a staging instance [https://mana.mozilla.org/wiki/display/QA/selenium-hub-staging1.qa.scl3.mozilla.com documented here].


== Selenium Grid Nodes ==
== Selenium Grid Nodes ==
Line 118: Line 118:
The output will display the FQDN of the computer.
The output will display the FQDN of the computer.


== Updating ==
== Updating Selenium ==
Before updating the Grid we need to test locally with the latest Firefox and Selenium versions.
Follow these steps to upgrade the version of Selenium.
# 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 (latest-version).
 
#* Install the latest Firefox version on your local machine
=== Update staging instance ==
#* Change the Selenium version to be the latest (in <code>default.properties</code> file), then it will be downloaded automatically when starting the hub/node.
* If you're not on a Mozilla office network, connect to the [https://mana.mozilla.org/wiki/display/SD/VPN Mozilla VPN]
#* Update the JSON files for your operating system - add the latest browser, binary and details. (for both hub and nodes)
* [http://webqa-ci-staging1.qa.scl3.mozilla.com:8080/login Login to Jenkins]
#* Update the Selenium client using <code>pip install -r requirements.txt</code>. Start the hub and node and start testing.
* [http://webqa-ci-staging1.qa.scl3.mozilla.com:8080/quietDown Prepare Jenkins for shutdown]
# After changes are merged into the main GitHub repository, move the main Grid to run on "latest-version" branch.
* Wait until no jobs are running
# Once testing on the main Grid instance is successful, merge the latest-version branch into master and switch back to the master branch on the hub and nodes.
* Connect to selenium-staging1.qa.scl3.mozilla.com using RDP
* Stop the Selenium node by hitting Ctrl+C in the terminal window
* Update the Selenium major and minor versions in <code>C:\Users\mozauto\moz-grid-config\default.properties</code>
* Start the Selenium server by running <code>ant -autoproxy -Denv=staging -Dnode.host=IP</code>
* Connect to selenium-5.qa.mtv2.mozilla.com using VNC
* Stop the Selenium node by hitting Ctrl+C in the terminal window
* Update the Selenium version in /Users/webqa/moz-grid-config/default.properties
* Start the Selenium server by running <code>ant -Denv=staging</code>
* Connect to selenium-hub-staging1.qa.scl3.mozilla.com using SSH
* Stop the Selenium hub by running <code>sudo initctl stop selenium</code>
* Update the Selenium version in <code>/etc/init/selenium.conf</code>
* Start the Selenium hub by running <code>sudo initctl start selenium</code>
* [http://webqa-ci-staging1.qa.scl3.mozilla.com:8080/cancelQuietDown Cancel the Jenkins shutdown]
* Verify the hub and node versions on the [http://selenium-hub1.qa.scl3.mozilla.com:4444/grid/console Selenium hub console]
 
=== Testing staging instance ===
 
=== Update moz-grid-config ===
 
=== Update production instance ===
* [https://webqa-ci.mozilla.com/login Login to Jenkins]
* [https://webqa-ci.mozilla.com/quietDown Prepare Jenkins for shutdown]
* Wait until no jobs are running
* Connect to selenium1.qa.scl3.mozilla.com using RDP
* Stop the Selenium node by hitting Ctrl+C in the terminal window
* Pull down the latest moz-grid-config changes by running <code>git pull</code>
* Start the Selenium server by running <code>ant -autoproxy -Denv=production</code>
* Repeat for selenium2, selenium3, selenium4, selenium5, and selenium6
* Connect to selenium.qa.mtv2.mozilla.com using VNC
* Stop the Selenium node by hitting Ctrl+C in the terminal window
* Pull down the latest moz-grid-config changes by running <code>git pull</code>
* Start the Selenium server by running <code>ant -Denv=production</code>
* Connect to selenium-hub1.qa.scl3.mozilla.com using SSH
* Stop the Selenium hub by running <code>sudo initctl stop selenium</code>
* Update the Selenium version in /etc/init/selenium.conf
* Start the Selenium hub by running <code>sudo initctl start selenium</code>
* [https://webqa-ci.mozilla.com/cancelQuietDown Cancel the Jenkins shutdown]
* Verify the hub and node versions on the [http://selenium-hub1.qa.scl3.mozilla.com:4444/grid/console Selenium hub console]
Confirmed users
2,177

edits

Navigation menu