SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
Friday, November 5, 2010
Friday, November 5, 2010
London Selenium Meetup
Friday, November 5, 2010
How Mozilla Uses Selenium
Stephen Donner
November 3, 2010
London Selenium Meetup
Friday, November 5, 2010
3
Friday, November 5, 2010
Overview
• Humble Beginnings
• First (Real) Cut at Automation
• Current Architecture (diagram)
• Hudson (Continuous Integration)
• Our Driver / TestRunner Implementation
• Thanks, Python+urllib
• Page Object Model
• The Future
• Questions?
3
Friday, November 5, 2010
Humble Beginnings
• All IDE, all the time
• Necessary evil, but painful
• No scripted runs, inadequate reporting
• Graduated to RC
• Still uncoordinated, ad-hoc running
• We all ran tests from the command-line
• Still no great reporting/build history
4
Friday, November 5, 2010
First (Real) Cut at Automation
• TCparams.py - sort options, applications (still
exists)
• AMOfunctions.py - 2,677 lines
• Really meaty -- see https://wiki.mozilla.org/AMOfunctions
• AMOlocators.py - 1,230 lines
• Flat file of XPath and CSS locators
5
Friday, November 5, 2010
Current Architecture
6
Friday, November 5, 2010
Hudson
• Gives us:
• Reporting / notification
• Email / status page / IRC
• Scheduling
• Build history
7
Friday, November 5, 2010
Our Driver / TestRunner Implementation
• Allows us to abstract code from core (driver)
• tests.py - list of smoke / bft / fft, etc. tests
• consolidates all testfiles in one location, per-project
• ability to tag tests:
8
Friday, November 5, 2010
Our Driver / TestRunner Implementation
• suite.py - driver magic; uses Python’s unittest module
– spawns a new, per-browser process
– runs all tests in parallel among browsers
– only time-bound by the longest-running test (/me glares at IE)
9
Friday, November 5, 2010
Our Driver / TestRunner Implementation
• Running tests for specific features is as simple as:
• python suite.py fft
• python suite.py bft collections (logical AND operation)
• etc...
10
Friday, November 5, 2010
Thanks, Python+urllib
• Staging servers down, much?
• Two ways of dealing with this:
1. From suite.py:
2. From SUMO’s sumo_page.py:
11
Friday, November 5, 2010
Page Object Model
page.py
• Base class for ALL pages; most common functions (click, verify, etc.)
• Individual page classes derive from it
12
Friday, November 5, 2010
Page Object Model
sumo_page.py
• All common elements of a SUMO page: log in/out, My Account, header/
footer, etc.
13
Friday, November 5, 2010
Page Object Model
support_home_page.py
• Page elements are defined as class variables
• Operations that can be performed on the above are defined as functions
14
Friday, November 5, 2010
Page Object Model
test_search_on_home_page.py
15
Friday, November 5, 2010
Page Object Model
• Benefits:
• Easy to read (and write) tests
• Reduces the amount of duplicated code
• Less ramp-up time for new testers + community
• No more giant function files (distributed among pages)
• Caveats:
• All tests can now fail if a common element is broken
• e.g..: AMO footer
• Multiple imports
16
Friday, November 5, 2010
The Future
• Projects in the POM where it makes sense
(typically the case)
• Build-in screen / video captures of failures?
• Selenium 2; update our tests
• Native HTTP header manipulation?
• (Specifically, user-agent/accept-headers)
17
Friday, November 5, 2010
Resources / References
• WebQA homepage: https://wiki.mozilla.org/
QA/Execution/Web_Testing
• Automation page on QMO: http://
quality.mozilla.org/docs/webqa/projects/
automation/
• WebQA Mailing List (public):
mozwebqa@mozilla.org
18
Friday, November 5, 2010
Questions?
19
Friday, November 5, 2010
stephend@mozilla.com
Friday, November 5, 2010
Thanks!
stephend@mozilla.com
Friday, November 5, 2010

Weitere ähnliche Inhalte

Was ist angesagt? (6)

Playing with playgrounds
Playing with playgroundsPlaying with playgrounds
Playing with playgrounds
 
Do you queue
Do you queueDo you queue
Do you queue
 
10 Things you should know about Ruby
10 Things you should know about Ruby10 Things you should know about Ruby
10 Things you should know about Ruby
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend tooling
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 
Boots and Shoeboxes
Boots and ShoeboxesBoots and Shoeboxes
Boots and Shoeboxes
 

Ähnlich wie "How Mozilla Uses Selenium"

Selenium at Mozilla: An Essential Element to our Success
Selenium at Mozilla: An Essential Element to our SuccessSelenium at Mozilla: An Essential Element to our Success
Selenium at Mozilla: An Essential Element to our Success
Stephen Donner
 
O365Engage17 - How to Automate SharePoint Provisioning with PNP Framework
O365Engage17 - How to Automate SharePoint Provisioning with PNP FrameworkO365Engage17 - How to Automate SharePoint Provisioning with PNP Framework
O365Engage17 - How to Automate SharePoint Provisioning with PNP Framework
NCCOMMS
 
BP214 IBM Lotus Symphony : Finally, A Developer's Friend
BP214 IBM Lotus Symphony : Finally, A Developer's FriendBP214 IBM Lotus Symphony : Finally, A Developer's Friend
BP214 IBM Lotus Symphony : Finally, A Developer's Friend
John Head
 
PowerShell for the Anxious ITPro
PowerShell for the Anxious ITProPowerShell for the Anxious ITPro
PowerShell for the Anxious ITPro
Jason Himmelstein
 

Ähnlich wie "How Mozilla Uses Selenium" (20)

Feature Bits at LSSC10
Feature  Bits at LSSC10Feature  Bits at LSSC10
Feature Bits at LSSC10
 
Selenium at Mozilla: An Essential Element to our Success
Selenium at Mozilla: An Essential Element to our SuccessSelenium at Mozilla: An Essential Element to our Success
Selenium at Mozilla: An Essential Element to our Success
 
App Engine Meetup
App Engine MeetupApp Engine Meetup
App Engine Meetup
 
Mozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10nMozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10n
 
Speed up large-scale ML/DL offline inference job with Alluxio
Speed up large-scale ML/DL offline inference job with AlluxioSpeed up large-scale ML/DL offline inference job with Alluxio
Speed up large-scale ML/DL offline inference job with Alluxio
 
Railsconf 2010
Railsconf 2010Railsconf 2010
Railsconf 2010
 
conjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Clientconjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Client
 
O365Engage17 - How to Automate SharePoint Provisioning with PNP Framework
O365Engage17 - How to Automate SharePoint Provisioning with PNP FrameworkO365Engage17 - How to Automate SharePoint Provisioning with PNP Framework
O365Engage17 - How to Automate SharePoint Provisioning with PNP Framework
 
BP214 IBM Lotus Symphony : Finally, A Developer's Friend
BP214 IBM Lotus Symphony : Finally, A Developer's FriendBP214 IBM Lotus Symphony : Finally, A Developer's Friend
BP214 IBM Lotus Symphony : Finally, A Developer's Friend
 
Plone Testing Tools And Techniques
Plone Testing Tools And TechniquesPlone Testing Tools And Techniques
Plone Testing Tools And Techniques
 
Jenkins (war)stories
Jenkins (war)storiesJenkins (war)stories
Jenkins (war)stories
 
The Reluctant SysAdmin : 360|iDev Austin 2010
The Reluctant SysAdmin : 360|iDev Austin 2010The Reluctant SysAdmin : 360|iDev Austin 2010
The Reluctant SysAdmin : 360|iDev Austin 2010
 
PowerShell for the Anxious ITPro
PowerShell for the Anxious ITProPowerShell for the Anxious ITPro
PowerShell for the Anxious ITPro
 
What you can do In WatiR
What you can do In WatiRWhat you can do In WatiR
What you can do In WatiR
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby Conference
 
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and Abstractions
 
A 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersA 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developers
 
ProjectFork 4.1 in Joomla! 3.x
ProjectFork 4.1 in Joomla! 3.xProjectFork 4.1 in Joomla! 3.x
ProjectFork 4.1 in Joomla! 3.x
 
Automation using-phing
Automation using-phingAutomation using-phing
Automation using-phing
 

Mehr von Stephen Donner

How WebQA Reponds to, Plans For, and Executes on, New Projects
How WebQA Reponds to, Plans For, and Executes on, New ProjectsHow WebQA Reponds to, Plans For, and Executes on, New Projects
How WebQA Reponds to, Plans For, and Executes on, New Projects
Stephen Donner
 
Towards a More Secure, Reliable, and Performant Web: Tools / Approaches to Help
Towards a More Secure, Reliable, and Performant Web: Tools / Approaches to HelpTowards a More Secure, Reliable, and Performant Web: Tools / Approaches to Help
Towards a More Secure, Reliable, and Performant Web: Tools / Approaches to Help
Stephen Donner
 

Mehr von Stephen Donner (11)

Firefox and web performance testing, all hands sf 2018
Firefox and web performance testing, all hands sf 2018Firefox and web performance testing, all hands sf 2018
Firefox and web performance testing, all hands sf 2018
 
Web-Performance Testing @ Mozilla: present...and future?
Web-Performance Testing @ Mozilla: present...and future?Web-Performance Testing @ Mozilla: present...and future?
Web-Performance Testing @ Mozilla: present...and future?
 
Mozilla Web QA: Who, What, Why, How
Mozilla Web QA: Who, What, Why, HowMozilla Web QA: Who, What, Why, How
Mozilla Web QA: Who, What, Why, How
 
Firefox OS real-phone automation lab: goals, challenges, and successes
Firefox OS real-phone automation lab: goals, challenges, and successesFirefox OS real-phone automation lab: goals, challenges, and successes
Firefox OS real-phone automation lab: goals, challenges, and successes
 
B2G QA-automation lab presentation
B2G QA-automation lab presentationB2G QA-automation lab presentation
B2G QA-automation lab presentation
 
Web QA Gaia/B2G/Firefox OS front-end automation
Web QA Gaia/B2G/Firefox OS front-end automationWeb QA Gaia/B2G/Firefox OS front-end automation
Web QA Gaia/B2G/Firefox OS front-end automation
 
How WebQA Reponds to, Plans For, and Executes on, New Projects
How WebQA Reponds to, Plans For, and Executes on, New ProjectsHow WebQA Reponds to, Plans For, and Executes on, New Projects
How WebQA Reponds to, Plans For, and Executes on, New Projects
 
Continuous deployment
Continuous deploymentContinuous deployment
Continuous deployment
 
Selenium lightning-talk
Selenium lightning-talkSelenium lightning-talk
Selenium lightning-talk
 
Towards a More Secure, Reliable, and Performant Web: Tools / Approaches to Help
Towards a More Secure, Reliable, and Performant Web: Tools / Approaches to HelpTowards a More Secure, Reliable, and Performant Web: Tools / Approaches to Help
Towards a More Secure, Reliable, and Performant Web: Tools / Approaches to Help
 
Testing Mozilla Web Properties
Testing Mozilla Web PropertiesTesting Mozilla Web Properties
Testing Mozilla Web Properties
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

"How Mozilla Uses Selenium"

  • 4. How Mozilla Uses Selenium Stephen Donner November 3, 2010 London Selenium Meetup Friday, November 5, 2010
  • 6. Overview • Humble Beginnings • First (Real) Cut at Automation • Current Architecture (diagram) • Hudson (Continuous Integration) • Our Driver / TestRunner Implementation • Thanks, Python+urllib • Page Object Model • The Future • Questions? 3 Friday, November 5, 2010
  • 7. Humble Beginnings • All IDE, all the time • Necessary evil, but painful • No scripted runs, inadequate reporting • Graduated to RC • Still uncoordinated, ad-hoc running • We all ran tests from the command-line • Still no great reporting/build history 4 Friday, November 5, 2010
  • 8. First (Real) Cut at Automation • TCparams.py - sort options, applications (still exists) • AMOfunctions.py - 2,677 lines • Really meaty -- see https://wiki.mozilla.org/AMOfunctions • AMOlocators.py - 1,230 lines • Flat file of XPath and CSS locators 5 Friday, November 5, 2010
  • 10. Hudson • Gives us: • Reporting / notification • Email / status page / IRC • Scheduling • Build history 7 Friday, November 5, 2010
  • 11. Our Driver / TestRunner Implementation • Allows us to abstract code from core (driver) • tests.py - list of smoke / bft / fft, etc. tests • consolidates all testfiles in one location, per-project • ability to tag tests: 8 Friday, November 5, 2010
  • 12. Our Driver / TestRunner Implementation • suite.py - driver magic; uses Python’s unittest module – spawns a new, per-browser process – runs all tests in parallel among browsers – only time-bound by the longest-running test (/me glares at IE) 9 Friday, November 5, 2010
  • 13. Our Driver / TestRunner Implementation • Running tests for specific features is as simple as: • python suite.py fft • python suite.py bft collections (logical AND operation) • etc... 10 Friday, November 5, 2010
  • 14. Thanks, Python+urllib • Staging servers down, much? • Two ways of dealing with this: 1. From suite.py: 2. From SUMO’s sumo_page.py: 11 Friday, November 5, 2010
  • 15. Page Object Model page.py • Base class for ALL pages; most common functions (click, verify, etc.) • Individual page classes derive from it 12 Friday, November 5, 2010
  • 16. Page Object Model sumo_page.py • All common elements of a SUMO page: log in/out, My Account, header/ footer, etc. 13 Friday, November 5, 2010
  • 17. Page Object Model support_home_page.py • Page elements are defined as class variables • Operations that can be performed on the above are defined as functions 14 Friday, November 5, 2010
  • 19. Page Object Model • Benefits: • Easy to read (and write) tests • Reduces the amount of duplicated code • Less ramp-up time for new testers + community • No more giant function files (distributed among pages) • Caveats: • All tests can now fail if a common element is broken • e.g..: AMO footer • Multiple imports 16 Friday, November 5, 2010
  • 20. The Future • Projects in the POM where it makes sense (typically the case) • Build-in screen / video captures of failures? • Selenium 2; update our tests • Native HTTP header manipulation? • (Specifically, user-agent/accept-headers) 17 Friday, November 5, 2010
  • 21. Resources / References • WebQA homepage: https://wiki.mozilla.org/ QA/Execution/Web_Testing • Automation page on QMO: http:// quality.mozilla.org/docs/webqa/projects/ automation/ • WebQA Mailing List (public): mozwebqa@mozilla.org 18 Friday, November 5, 2010