mozilla selenium and_hudson

17
Raymond Etornam Mozilla Corporation 05-19-2010 Mozilla, Selenium and Hudson CI: A Big, Open-Source Happy Family

Upload: retornam

Post on 06-May-2015

1.978 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Mozilla selenium and_hudson

Raymond EtornamMozilla Corporation

05-19-2010

Mozilla, Selenium and Hudson CI:A Big, Open-Source Happy Family

Page 2: Mozilla selenium and_hudson

 

• Where we were

• Where we are

• Where we want to be

Page 3: Mozilla selenium and_hudson

•  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

 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

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

  

  We needed change

Page 7: Mozilla selenium and_hudson

  

  This brings us to where we are

Page 8: Mozilla selenium and_hudson

Selenium Grid + Hudson

Page 9: Mozilla selenium and_hudson

 

 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

• 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

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

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

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

 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

\

         

   Demo / questions

Page 16: Mozilla selenium and_hudson

\       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

Page 17: Mozilla selenium and_hudson

[email protected]

Thank you!