Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Mozilla selenium and_hudson

3,129 views

Published on

Published in: Technology, News & Politics
  • Be the first to comment

Mozilla selenium and_hudson

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

×