Mozilla selenium and_hudson
-
Upload
retornam -
Category
Technology
-
view
1.978 -
download
0
Transcript of Mozilla selenium and_hudson
![Page 1: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/1.jpg)
Raymond EtornamMozilla Corporation
05-19-2010
Mozilla, Selenium and Hudson CI:A Big, Open-Source Happy Family
![Page 2: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/2.jpg)
• Where we were
• Where we are
• Where we want to be
![Page 3: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/3.jpg)
• Mozilla.com: http://www.mozilla.com
• AMO: http://addons.mozilla.org
• SUMO: http://support.mozilla.com
We use Selenium on:
![Page 4: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/4.jpg)
Where we were •Browsers our projects currently support are:oFirefox 3.6.x, Firefox 3.5.x, Firefox 3.0.xoInternet Explorer 6 to 8oOpera 9 and 10.xoChrome 4 & 5 (Beta for Mac)
•Manually testing web pages across browsers and operating systems is a very hard, time-consuming task
![Page 5: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/5.jpg)
Selenium IDE
•Works only on Firefox
•Works best if you have a small amount of tests
•Though faster than manual testing, it is not as fast as using Selenium RC client driver
•results.html is good, but limited
![Page 6: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/6.jpg)
We needed change
![Page 7: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/7.jpg)
This brings us to where we are
![Page 8: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/8.jpg)
Selenium Grid + Hudson
![Page 9: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/9.jpg)
Our setup •Two Mac Minis running Windows XP, Vista, and Ubuntu VMs
• We have the following remote controls running:oChromeoFirefox 3.6oFirefox 3.5oSafarioIE 7 and IE 8
![Page 10: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/10.jpg)
• Tests are written in Python • Hudson polls our SVN
repository every 5 minutes• Runs tests once there has
been a check-in
![Page 11: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/11.jpg)
Current setup for addons.mozilla.org(evolving):
•TCParams.pyoall sorts of config options for AMOlocators.py
•AMOlocators.pyoXPath locators
•AMOfunctions.pyoshared functions
•AMO_smoke_test_suite.pyolist of smoketests w/params
![Page 12: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/12.jpg)
T A couple huge problems:
•Staging sites (like ours!) that use self-signed certificates are hard to automate across browsers with Selenium•Browser session problems
![Page 13: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/13.jpg)
Lessons learned:
•Write reusable code/classes•Run tests as often as you can•Proper use of XPath and CSS selectors make Selenium testing easier
![Page 14: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/14.jpg)
Where we want to be
•Extend this model of testing to all web projects
•Encourage contributors
•Have greater coverage for our Selenium integration tests
![Page 15: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/15.jpg)
\
Demo / questions
![Page 16: Mozilla selenium and_hudson](https://reader035.fdocuments.us/reader035/viewer/2022062418/55493781b4c905054d8b4822/html5/thumbnails/16.jpg)
\ Interested in Helping?
•WebQA homepage:•http://wiki.mozilla.org/QA/Execution/Web_Testing
•Contribute page:•https://wiki.mozilla.org/QA/Execution/Web_Testing/Contribute
•SVN Repository:•http://viewvc.svn.mozilla.org/vc/addons/trunk/site/app/tests/selenium/pythonTests
•Real-time contact:•irc.mozilla.org in #mozwebqa