SlideShare una empresa de Scribd logo
1 de 22
Selenium at
Salesforce Scale
David Louvton
Lead Engineer
dlouvton@salesforce.com
Sagar Wanaselja
Lead Engineer
• About Salesforce engineering
• Operating a selenium farm
• Selenium design patterns
• Overcoming test failures
• Q&A
Agenda
Salesforce Scale
• 3:2 ratio for developers : quality engineers
• everyone is a software engineer; role varies
• selenium committers on staff (Jim Evans, Luke Inman)
• Data centers with thousands of VMs for automation
• multimillion dollar investment
• using vmware (VShere), OpenStack and EC2
• 500 commits per day
• ~120 software engineering teams
Why Salesforce loves WebDriver
WebDriver is the only test framework in our current
arsenal that truly mimics an end-user’s experience
• We don’t mock anything
• We test against a live app
• We suffer the pain of latency
• We test end to end on almost every action
WebDriver tests can catch things other levels of tests
can’t
• Multi-platform consistency
• DOM consistency
• Rendering issues
• Catching inconsistency between
app layers
source: watirmelon.com © Alister Scott
UI Testing Portfolio
• 50,000 unique Selenium tests
• 7,500 unique WebDriver tests
• full “browser compatibility”: IE6-IE11, Firefox, Chrome, Safari
• some can run in headless browser like Phantom JS
• 2,000 javascript unit tests
• no DOM required
• 10ms average execution time
source: watirmelon.com © Alister Scott
1,000,000 browser tests per day
• Click here to add bullets
The Selenium Infrastructure
● Automatically creating, assigning, closing and reopening
bug reports for test failures and flapping tests .
● Test jobs must meet failure thresholds (99%+). Code
lines are locked for teams under thresholds
● Support for all combinations of OS & Browser using
portable VM Templates, creating deterministic and identical
test environments
Issues of scale
• Assigning test failures to the responsible engineer
• Non deterministic tests (flappers) and re-runs
• Selenium jar upgrades are challenging
• Browser upgrades are challenging
• IT and automation ops provide different versions
• Large suites: adjust run frequency, deprecate old tests
Salesforce UI Testing Pattern
• Click here to add bullets
Proper Page Objects Encapsulate Selenium
• Make an API of your page for your test
• No imports for “openqa” or “selenium.org” in your test
• All references to driver & selenium in the page object
• Fail fast - call the page object factory in test setup
• No assertions in page objects (or any test utility)
• Share page objects across engineering teams
• developer complete UI should have a page object
• if you can’t make one it’s not a testable page
• dependency challenges at scale
Challenges for Mobile Platforms
• Adapting page objects to platform specific UI elements
• Screen sizes and adaptive layouts
• “stage left” - switching into contained apps
• lightweight page objects = widgets
• Avoid browser or platform specific code in actual tests
• establish context elsewhere in utils or page objects
• Automated tests in emulators (99%+)
• manual tests on devices before release
• exception: testing video
Sagar Wanaselja
Lead Engineer
swanaselja@salesforce.com
Problematic WebDriver Test
Better WebDriver Test
PageObject WebDriver Test
Diagnosing Test Failures
• Screenshot and HTML capture at failure point
• AssertionError or RuntimeException
• Differences between localhost and automation VM
• Optimistic timing assumptions
• javascript, rendering, server response, etc.
• Defensive “negative” testing
• Getting to 100% tests passing
Pro Tips
• Version tests and app code (and configuration) together
• Use the Page Object model
• Use the API to set up the test, not the UI
• Anticipate Selenium and Browser releases
• Allocate capacity to browsers most used by customers
• log the user agent on every page view
More Pro Tips
• Avoid using xpath selectors
• Complex DOM makes xpath evaluation much slower
• Some xpaths are not properly evaluated in WebDriver
• When working with popups make sure you return focus
to the main window
• For static/simple HTML pages consider the
HtmlUnitDriver
Mature Quality Strategies
• Selenium for dynamic security vulnerability analysis
• Pixel perfect image diffs
• Accessibility testing (tab completion)
• Testing javascript with unit tests
• Selenium is for testing browser compatibility and DOM

Más contenido relacionado

La actualidad más candente

Shift left - find defects earlier through automated test and deployment
Shift left - find defects earlier through automated test and deploymentShift left - find defects earlier through automated test and deployment
Shift left - find defects earlier through automated test and deploymentClaudia Ring
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
 
Top 20 best automation testing tools
Top 20 best automation testing toolsTop 20 best automation testing tools
Top 20 best automation testing toolsQACraft
 
Jira dashboards gadgets
Jira dashboards gadgetsJira dashboards gadgets
Jira dashboards gadgetsSajit Nair
 
How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy Impetus Technologies
 
Agile Testing Strategy
Agile Testing StrategyAgile Testing Strategy
Agile Testing Strategytharindakasun
 
Software Craftsmanship
Software CraftsmanshipSoftware Craftsmanship
Software CraftsmanshipSandro Mancuso
 
Azure Boards.pptx
Azure Boards.pptxAzure Boards.pptx
Azure Boards.pptxNitin Sethi
 
Test Driven Development With Python
Test Driven Development With PythonTest Driven Development With Python
Test Driven Development With PythonSiddhi
 
Xray for Jira - Overview
Xray for Jira - OverviewXray for Jira - Overview
Xray for Jira - OverviewXpand IT
 
Test Cases Maintaining & Documenting
Test Cases Maintaining & DocumentingTest Cases Maintaining & Documenting
Test Cases Maintaining & DocumentingSeyed Ali Marjaie
 
Build tools introduction
Build tools introductionBuild tools introduction
Build tools introductionvodQA
 
Execute Automation Testing in 3 Steps
Execute Automation Testing in 3 StepsExecute Automation Testing in 3 Steps
Execute Automation Testing in 3 StepsExecuteAutomation
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planningSivaprasanthRentala1975
 

La actualidad más candente (20)

Test automation process
Test automation processTest automation process
Test automation process
 
Shift left - find defects earlier through automated test and deployment
Shift left - find defects earlier through automated test and deploymentShift left - find defects earlier through automated test and deployment
Shift left - find defects earlier through automated test and deployment
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
Top 20 best automation testing tools
Top 20 best automation testing toolsTop 20 best automation testing tools
Top 20 best automation testing tools
 
Jira dashboards gadgets
Jira dashboards gadgetsJira dashboards gadgets
Jira dashboards gadgets
 
How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy
 
Agile Testing Strategy
Agile Testing StrategyAgile Testing Strategy
Agile Testing Strategy
 
Software Craftsmanship
Software CraftsmanshipSoftware Craftsmanship
Software Craftsmanship
 
Azure Boards.pptx
Azure Boards.pptxAzure Boards.pptx
Azure Boards.pptx
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Definition of done
Definition of doneDefinition of done
Definition of done
 
Test Driven Development With Python
Test Driven Development With PythonTest Driven Development With Python
Test Driven Development With Python
 
Xray for Jira - Overview
Xray for Jira - OverviewXray for Jira - Overview
Xray for Jira - Overview
 
Test Cases Maintaining & Documenting
Test Cases Maintaining & DocumentingTest Cases Maintaining & Documenting
Test Cases Maintaining & Documenting
 
test_automation_POC
test_automation_POCtest_automation_POC
test_automation_POC
 
XRAY for Jira
XRAY for JiraXRAY for Jira
XRAY for Jira
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Build tools introduction
Build tools introductionBuild tools introduction
Build tools introduction
 
Execute Automation Testing in 3 Steps
Execute Automation Testing in 3 StepsExecute Automation Testing in 3 Steps
Execute Automation Testing in 3 Steps
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planning
 

Destacado

Performance Monitoring and Testing in the Salesforce Cloud
Performance Monitoring and Testing in the Salesforce CloudPerformance Monitoring and Testing in the Salesforce Cloud
Performance Monitoring and Testing in the Salesforce CloudSalesforce Developers
 
Salesforce Testing Resume
Salesforce Testing ResumeSalesforce Testing Resume
Salesforce Testing ResumeSowmya J
 
Testing Salesforce at Cloud Scale
Testing Salesforce at Cloud ScaleTesting Salesforce at Cloud Scale
Testing Salesforce at Cloud Scalegwestr
 
Cowboy tools and attire
Cowboy tools and attireCowboy tools and attire
Cowboy tools and attireChristianN2T
 
Sustainable Leadership
Sustainable LeadershipSustainable Leadership
Sustainable LeadershipLaura Pasquini
 
Merchandising Portfolio
Merchandising PortfolioMerchandising Portfolio
Merchandising Portfoliodarious
 
Software in Naval Architecture and Marine Engineering
Software in Naval Architecture and Marine EngineeringSoftware in Naval Architecture and Marine Engineering
Software in Naval Architecture and Marine EngineeringIslamAlMallah
 
Top 10 pc support technician interview questions and answers
Top 10 pc support technician interview questions and answersTop 10 pc support technician interview questions and answers
Top 10 pc support technician interview questions and answersmarcdanny68
 
Alternative teaching strategies
Alternative teaching strategiesAlternative teaching strategies
Alternative teaching strategiesMontessori Center
 
Selling 101 What Every Successful Sales Professional Needs
Selling 101  What Every Successful Sales Professional NeedsSelling 101  What Every Successful Sales Professional Needs
Selling 101 What Every Successful Sales Professional Needsd0466594
 
OSMOTIC DRUG DELIVERY SYSTEM
OSMOTIC DRUG DELIVERY SYSTEMOSMOTIC DRUG DELIVERY SYSTEM
OSMOTIC DRUG DELIVERY SYSTEMRiteksha Patel
 
Crafting an Engagement Strategy
Crafting an Engagement StrategyCrafting an Engagement Strategy
Crafting an Engagement StrategyEric Weaver
 
Role of IT in supply chain management
Role of IT in supply chain managementRole of IT in supply chain management
Role of IT in supply chain managementNeelam Yadav
 
How to plan your sales territory
How to plan your sales territoryHow to plan your sales territory
How to plan your sales territoryCamilo Rojas
 
ERP Module Finance
ERP Module FinanceERP Module Finance
ERP Module FinanceAshok Sinch
 
Growth and development of cranium and face
Growth and development of cranium and faceGrowth and development of cranium and face
Growth and development of cranium and faceRajesh Bariker
 
Fame analysis techniques
Fame analysis techniquesFame analysis techniques
Fame analysis techniquesSarfaraz Nasri
 

Destacado (20)

Best Practices for Testing in salesforce.com
Best Practices for Testing in salesforce.comBest Practices for Testing in salesforce.com
Best Practices for Testing in salesforce.com
 
Performance Monitoring and Testing in the Salesforce Cloud
Performance Monitoring and Testing in the Salesforce CloudPerformance Monitoring and Testing in the Salesforce Cloud
Performance Monitoring and Testing in the Salesforce Cloud
 
Salesforce Testing Resume
Salesforce Testing ResumeSalesforce Testing Resume
Salesforce Testing Resume
 
Testing Salesforce at Cloud Scale
Testing Salesforce at Cloud ScaleTesting Salesforce at Cloud Scale
Testing Salesforce at Cloud Scale
 
Cowboy tools and attire
Cowboy tools and attireCowboy tools and attire
Cowboy tools and attire
 
Sustainable Leadership
Sustainable LeadershipSustainable Leadership
Sustainable Leadership
 
Merchandising Portfolio
Merchandising PortfolioMerchandising Portfolio
Merchandising Portfolio
 
Software in Naval Architecture and Marine Engineering
Software in Naval Architecture and Marine EngineeringSoftware in Naval Architecture and Marine Engineering
Software in Naval Architecture and Marine Engineering
 
Top 10 pc support technician interview questions and answers
Top 10 pc support technician interview questions and answersTop 10 pc support technician interview questions and answers
Top 10 pc support technician interview questions and answers
 
Alternative teaching strategies
Alternative teaching strategiesAlternative teaching strategies
Alternative teaching strategies
 
Gas transfer
Gas transferGas transfer
Gas transfer
 
Selling 101 What Every Successful Sales Professional Needs
Selling 101  What Every Successful Sales Professional NeedsSelling 101  What Every Successful Sales Professional Needs
Selling 101 What Every Successful Sales Professional Needs
 
OSMOTIC DRUG DELIVERY SYSTEM
OSMOTIC DRUG DELIVERY SYSTEMOSMOTIC DRUG DELIVERY SYSTEM
OSMOTIC DRUG DELIVERY SYSTEM
 
Crafting an Engagement Strategy
Crafting an Engagement StrategyCrafting an Engagement Strategy
Crafting an Engagement Strategy
 
Role of IT in supply chain management
Role of IT in supply chain managementRole of IT in supply chain management
Role of IT in supply chain management
 
Storm water drainage
Storm water drainageStorm water drainage
Storm water drainage
 
How to plan your sales territory
How to plan your sales territoryHow to plan your sales territory
How to plan your sales territory
 
ERP Module Finance
ERP Module FinanceERP Module Finance
ERP Module Finance
 
Growth and development of cranium and face
Growth and development of cranium and faceGrowth and development of cranium and face
Growth and development of cranium and face
 
Fame analysis techniques
Fame analysis techniquesFame analysis techniques
Fame analysis techniques
 

Similar a Selenium at Salesforce Scale

selenium meetup sf talk march 2014 Selenium at Scale
selenium meetup sf talk march 2014 Selenium at Scaleselenium meetup sf talk march 2014 Selenium at Scale
selenium meetup sf talk march 2014 Selenium at ScaleDavid Louvton
 
Web Automation Testing for developers?
Web Automation Testing for developers?Web Automation Testing for developers?
Web Automation Testing for developers?Victor Kushchenko
 
Best java automation training institute in Bangalore - Selenium Labs
Best java automation training institute in Bangalore - Selenium Labs Best java automation training institute in Bangalore - Selenium Labs
Best java automation training institute in Bangalore - Selenium Labs Selenium Labs
 
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...Sencha
 
Resume_Sivasankaraiah Poli
Resume_Sivasankaraiah PoliResume_Sivasankaraiah Poli
Resume_Sivasankaraiah PoliSiva Poli
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPhil Leggetter
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testPeter Lindberg
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Wojciech Seliga
 
[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam Carmi
[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam Carmi[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam Carmi
[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam CarmiApplitools
 
AUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVEN
AUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVENAUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVEN
AUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVENSHASHI JAISWAL
 
Software Testing Tools Training
Software Testing Tools TrainingSoftware Testing Tools Training
Software Testing Tools TrainingQEdge Tech
 
Cross browser Testing JavaScript
Cross browser Testing JavaScriptCross browser Testing JavaScript
Cross browser Testing JavaScriptAlan Parkinson
 
An Automation Culture: The Key to Agile Success
An Automation Culture: The Key to Agile SuccessAn Automation Culture: The Key to Agile Success
An Automation Culture: The Key to Agile SuccessTechWell
 
Hacker Proof web app using Functional tests
Hacker Proof web  app using Functional testsHacker Proof web  app using Functional tests
Hacker Proof web app using Functional testsAnkita Gupta
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScriptSimon Guest
 

Similar a Selenium at Salesforce Scale (20)

selenium meetup sf talk march 2014 Selenium at Scale
selenium meetup sf talk march 2014 Selenium at Scaleselenium meetup sf talk march 2014 Selenium at Scale
selenium meetup sf talk march 2014 Selenium at Scale
 
Web Automation Testing for developers?
Web Automation Testing for developers?Web Automation Testing for developers?
Web Automation Testing for developers?
 
Best java automation training institute in Bangalore - Selenium Labs
Best java automation training institute in Bangalore - Selenium Labs Best java automation training institute in Bangalore - Selenium Labs
Best java automation training institute in Bangalore - Selenium Labs
 
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Resume_Sivasankaraiah Poli
Resume_Sivasankaraiah PoliResume_Sivasankaraiah Poli
Resume_Sivasankaraiah Poli
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load test
 
QAorHighway2016
QAorHighway2016QAorHighway2016
QAorHighway2016
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014
 
[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam Carmi
[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam Carmi[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam Carmi
[webinar] Cutting-edge Functional UI Testing Techniques - w/ Adam Carmi
 
AUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVEN
AUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVENAUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVEN
AUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVEN
 
Software Testing Tools Training
Software Testing Tools TrainingSoftware Testing Tools Training
Software Testing Tools Training
 
Cross browser Testing JavaScript
Cross browser Testing JavaScriptCross browser Testing JavaScript
Cross browser Testing JavaScript
 
Testing Angular
Testing AngularTesting Angular
Testing Angular
 
An Automation Culture: The Key to Agile Success
An Automation Culture: The Key to Agile SuccessAn Automation Culture: The Key to Agile Success
An Automation Culture: The Key to Agile Success
 
Hacker Proof web app using Functional tests
Hacker Proof web  app using Functional testsHacker Proof web  app using Functional tests
Hacker Proof web app using Functional tests
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
 
Selenium And Its Types
Selenium And Its TypesSelenium And Its Types
Selenium And Its Types
 

Más de Salesforce Engineering

Locker Service Ready Lightning Components With Webpack
Locker Service Ready Lightning Components With WebpackLocker Service Ready Lightning Components With Webpack
Locker Service Ready Lightning Components With WebpackSalesforce Engineering
 
Techniques to Effectively Monitor the Performance of Customers in the Cloud
Techniques to Effectively Monitor the Performance of Customers in the CloudTechniques to Effectively Monitor the Performance of Customers in the Cloud
Techniques to Effectively Monitor the Performance of Customers in the CloudSalesforce Engineering
 
Predictive System Performance Data Analysis
Predictive System Performance Data AnalysisPredictive System Performance Data Analysis
Predictive System Performance Data AnalysisSalesforce Engineering
 
Aspect Oriented Programming: Hidden Toolkit That You Already Have
Aspect Oriented Programming: Hidden Toolkit That You Already HaveAspect Oriented Programming: Hidden Toolkit That You Already Have
Aspect Oriented Programming: Hidden Toolkit That You Already HaveSalesforce Engineering
 
A Smarter Pig: Building a SQL interface to Pig using Apache Calcite
A Smarter Pig: Building a SQL interface to Pig using Apache CalciteA Smarter Pig: Building a SQL interface to Pig using Apache Calcite
A Smarter Pig: Building a SQL interface to Pig using Apache CalciteSalesforce Engineering
 
Implementing a Content Strategy Is Like Running 100 Miles
Implementing a Content Strategy Is Like Running 100 MilesImplementing a Content Strategy Is Like Running 100 Miles
Implementing a Content Strategy Is Like Running 100 MilesSalesforce Engineering
 
Salesforce Cloud Infrastructure and Challenges - A Brief Overview
Salesforce Cloud Infrastructure and Challenges - A Brief OverviewSalesforce Cloud Infrastructure and Challenges - A Brief Overview
Salesforce Cloud Infrastructure and Challenges - A Brief OverviewSalesforce Engineering
 
Global State Management of Micro Services
Global State Management of Micro ServicesGlobal State Management of Micro Services
Global State Management of Micro ServicesSalesforce Engineering
 

Más de Salesforce Engineering (20)

Locker Service Ready Lightning Components With Webpack
Locker Service Ready Lightning Components With WebpackLocker Service Ready Lightning Components With Webpack
Locker Service Ready Lightning Components With Webpack
 
Scaling HBase for Big Data
Scaling HBase for Big DataScaling HBase for Big Data
Scaling HBase for Big Data
 
Techniques to Effectively Monitor the Performance of Customers in the Cloud
Techniques to Effectively Monitor the Performance of Customers in the CloudTechniques to Effectively Monitor the Performance of Customers in the Cloud
Techniques to Effectively Monitor the Performance of Customers in the Cloud
 
Predictive System Performance Data Analysis
Predictive System Performance Data AnalysisPredictive System Performance Data Analysis
Predictive System Performance Data Analysis
 
Apache HBase State of the Project
Apache HBase State of the ProjectApache HBase State of the Project
Apache HBase State of the Project
 
Hit the Trail with Trailhead
Hit the Trail with TrailheadHit the Trail with Trailhead
Hit the Trail with Trailhead
 
HBase/PHOENIX @ Scale
HBase/PHOENIX @ ScaleHBase/PHOENIX @ Scale
HBase/PHOENIX @ Scale
 
Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applications
 
Containers and Security for DevOps
Containers and Security for DevOpsContainers and Security for DevOps
Containers and Security for DevOps
 
Aspect Oriented Programming: Hidden Toolkit That You Already Have
Aspect Oriented Programming: Hidden Toolkit That You Already HaveAspect Oriented Programming: Hidden Toolkit That You Already Have
Aspect Oriented Programming: Hidden Toolkit That You Already Have
 
Monitoring @ Scale in Salesforce
Monitoring @ Scale in SalesforceMonitoring @ Scale in Salesforce
Monitoring @ Scale in Salesforce
 
Performance Tuning with XHProf
Performance Tuning with XHProfPerformance Tuning with XHProf
Performance Tuning with XHProf
 
A Smarter Pig: Building a SQL interface to Pig using Apache Calcite
A Smarter Pig: Building a SQL interface to Pig using Apache CalciteA Smarter Pig: Building a SQL interface to Pig using Apache Calcite
A Smarter Pig: Building a SQL interface to Pig using Apache Calcite
 
Implementing a Content Strategy Is Like Running 100 Miles
Implementing a Content Strategy Is Like Running 100 MilesImplementing a Content Strategy Is Like Running 100 Miles
Implementing a Content Strategy Is Like Running 100 Miles
 
Salesforce Cloud Infrastructure and Challenges - A Brief Overview
Salesforce Cloud Infrastructure and Challenges - A Brief OverviewSalesforce Cloud Infrastructure and Challenges - A Brief Overview
Salesforce Cloud Infrastructure and Challenges - A Brief Overview
 
Koober Preduction IO Presentation
Koober Preduction IO PresentationKoober Preduction IO Presentation
Koober Preduction IO Presentation
 
Finding Security Issues Fast!
Finding Security Issues Fast!Finding Security Issues Fast!
Finding Security Issues Fast!
 
Microservices
MicroservicesMicroservices
Microservices
 
Global State Management of Micro Services
Global State Management of Micro ServicesGlobal State Management of Micro Services
Global State Management of Micro Services
 
The Future of Hbase
The Future of HbaseThe Future of Hbase
The Future of Hbase
 

Último

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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 Servicegiselly40
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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 MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
[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.pdfhans926745
 
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.pdfChristopherTHyatt
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
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 DevelopmentsTrustArc
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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 educationjfdjdjcjdnsjd
 
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 FresherRemote DBA Services
 
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?Antenna Manufacturer Coco
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Último (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
[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
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
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
 
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?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Selenium at Salesforce Scale

  • 1. Selenium at Salesforce Scale David Louvton Lead Engineer dlouvton@salesforce.com Sagar Wanaselja Lead Engineer
  • 2.
  • 3. • About Salesforce engineering • Operating a selenium farm • Selenium design patterns • Overcoming test failures • Q&A Agenda
  • 4. Salesforce Scale • 3:2 ratio for developers : quality engineers • everyone is a software engineer; role varies • selenium committers on staff (Jim Evans, Luke Inman) • Data centers with thousands of VMs for automation • multimillion dollar investment • using vmware (VShere), OpenStack and EC2 • 500 commits per day • ~120 software engineering teams
  • 5. Why Salesforce loves WebDriver WebDriver is the only test framework in our current arsenal that truly mimics an end-user’s experience • We don’t mock anything • We test against a live app • We suffer the pain of latency • We test end to end on almost every action WebDriver tests can catch things other levels of tests can’t • Multi-platform consistency • DOM consistency • Rendering issues • Catching inconsistency between app layers source: watirmelon.com © Alister Scott
  • 6. UI Testing Portfolio • 50,000 unique Selenium tests • 7,500 unique WebDriver tests • full “browser compatibility”: IE6-IE11, Firefox, Chrome, Safari • some can run in headless browser like Phantom JS • 2,000 javascript unit tests • no DOM required • 10ms average execution time source: watirmelon.com © Alister Scott
  • 7. 1,000,000 browser tests per day • Click here to add bullets
  • 8. The Selenium Infrastructure ● Automatically creating, assigning, closing and reopening bug reports for test failures and flapping tests . ● Test jobs must meet failure thresholds (99%+). Code lines are locked for teams under thresholds ● Support for all combinations of OS & Browser using portable VM Templates, creating deterministic and identical test environments
  • 9.
  • 10. Issues of scale • Assigning test failures to the responsible engineer • Non deterministic tests (flappers) and re-runs • Selenium jar upgrades are challenging • Browser upgrades are challenging • IT and automation ops provide different versions • Large suites: adjust run frequency, deprecate old tests
  • 11. Salesforce UI Testing Pattern • Click here to add bullets
  • 12. Proper Page Objects Encapsulate Selenium • Make an API of your page for your test • No imports for “openqa” or “selenium.org” in your test • All references to driver & selenium in the page object • Fail fast - call the page object factory in test setup • No assertions in page objects (or any test utility) • Share page objects across engineering teams • developer complete UI should have a page object • if you can’t make one it’s not a testable page • dependency challenges at scale
  • 13. Challenges for Mobile Platforms • Adapting page objects to platform specific UI elements • Screen sizes and adaptive layouts • “stage left” - switching into contained apps • lightweight page objects = widgets • Avoid browser or platform specific code in actual tests • establish context elsewhere in utils or page objects • Automated tests in emulators (99%+) • manual tests on devices before release • exception: testing video
  • 18. Diagnosing Test Failures • Screenshot and HTML capture at failure point • AssertionError or RuntimeException • Differences between localhost and automation VM • Optimistic timing assumptions • javascript, rendering, server response, etc. • Defensive “negative” testing • Getting to 100% tests passing
  • 19. Pro Tips • Version tests and app code (and configuration) together • Use the Page Object model • Use the API to set up the test, not the UI • Anticipate Selenium and Browser releases • Allocate capacity to browsers most used by customers • log the user agent on every page view
  • 20. More Pro Tips • Avoid using xpath selectors • Complex DOM makes xpath evaluation much slower • Some xpaths are not properly evaluated in WebDriver • When working with popups make sure you return focus to the main window • For static/simple HTML pages consider the HtmlUnitDriver
  • 21.
  • 22. Mature Quality Strategies • Selenium for dynamic security vulnerability analysis • Pixel perfect image diffs • Accessibility testing (tab completion) • Testing javascript with unit tests • Selenium is for testing browser compatibility and DOM