SlideShare a Scribd company logo
Selenium at
Salesforce Scale
David Louvton
Lead Engineer
dlouvton@salesforce.com
Sagar Wanaselja
Lead Engineer
Selenium at Salesforce Scale
• 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
Selenium at Salesforce Scale
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
Selenium at Salesforce Scale
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
Ad

More Related Content

What's hot (20)

Enhanced Web Service Testing: A Better Mock Structure
Enhanced Web Service Testing: A Better Mock StructureEnhanced Web Service Testing: A Better Mock Structure
Enhanced Web Service Testing: A Better Mock Structure
Salesforce Developers
 
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and MockitoAn Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
shaunthomas999
 
Como criar testes rápidos e robustos com Cypress
Como criar testes rápidos e robustos com CypressComo criar testes rápidos e robustos com Cypress
Como criar testes rápidos e robustos com Cypress
Walmyr Lima e Silva Filho
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeter
lethibichhoa
 
Testes de Software
Testes de SoftwareTestes de Software
Testes de Software
Capgemini
 
Mesurer les performances avec JMeter
Mesurer les performances avec JMeterMesurer les performances avec JMeter
Mesurer les performances avec JMeter
Claude Falguiere
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
Atul Pant
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
Pekka Klärck
 
Introduction to jmeter
Introduction to jmeterIntroduction to jmeter
Introduction to jmeter
test test
 
Robot Framework
Robot FrameworkRobot Framework
Robot Framework
Onur Baskirt
 
Automated Test Framework with Cucumber
Automated Test Framework with CucumberAutomated Test Framework with Cucumber
Automated Test Framework with Cucumber
Ramesh Krishnan Ganesan
 
Performance testing : An Overview
Performance testing : An OverviewPerformance testing : An Overview
Performance testing : An Overview
sharadkjain
 
[AUG]개발자와 QA가 상생하는 테스트 프로세스
[AUG]개발자와 QA가 상생하는 테스트 프로세스[AUG]개발자와 QA가 상생하는 테스트 프로세스
[AUG]개발자와 QA가 상생하는 테스트 프로세스
철민 신
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testing
Tharinda Liyanage
 
Fundamentals Performance Testing
Fundamentals Performance TestingFundamentals Performance Testing
Fundamentals Performance Testing
Bhuvaneswari Subramani
 
LoadRunner Performance Testing
LoadRunner Performance TestingLoadRunner Performance Testing
LoadRunner Performance Testing
Atul Pant
 
Performance testing
Performance testingPerformance testing
Performance testing
Jyoti Babbar
 
Performance Testing With Jmeter
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With Jmeter
Adam Goucher
 
Teste de Software - Introdução
Teste de Software - IntroduçãoTeste de Software - Introdução
Teste de Software - Introdução
Joeldson Costa Damasceno
 
Automated vs manual testing
Automated vs manual testingAutomated vs manual testing
Automated vs manual testing
Kanoah
 
Enhanced Web Service Testing: A Better Mock Structure
Enhanced Web Service Testing: A Better Mock StructureEnhanced Web Service Testing: A Better Mock Structure
Enhanced Web Service Testing: A Better Mock Structure
Salesforce Developers
 
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and MockitoAn Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
shaunthomas999
 
Como criar testes rápidos e robustos com Cypress
Como criar testes rápidos e robustos com CypressComo criar testes rápidos e robustos com Cypress
Como criar testes rápidos e robustos com Cypress
Walmyr Lima e Silva Filho
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeter
lethibichhoa
 
Testes de Software
Testes de SoftwareTestes de Software
Testes de Software
Capgemini
 
Mesurer les performances avec JMeter
Mesurer les performances avec JMeterMesurer les performances avec JMeter
Mesurer les performances avec JMeter
Claude Falguiere
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
Atul Pant
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
Pekka Klärck
 
Introduction to jmeter
Introduction to jmeterIntroduction to jmeter
Introduction to jmeter
test test
 
Performance testing : An Overview
Performance testing : An OverviewPerformance testing : An Overview
Performance testing : An Overview
sharadkjain
 
[AUG]개발자와 QA가 상생하는 테스트 프로세스
[AUG]개발자와 QA가 상생하는 테스트 프로세스[AUG]개발자와 QA가 상생하는 테스트 프로세스
[AUG]개발자와 QA가 상생하는 테스트 프로세스
철민 신
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testing
Tharinda Liyanage
 
LoadRunner Performance Testing
LoadRunner Performance TestingLoadRunner Performance Testing
LoadRunner Performance Testing
Atul Pant
 
Performance testing
Performance testingPerformance testing
Performance testing
Jyoti Babbar
 
Performance Testing With Jmeter
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With Jmeter
Adam Goucher
 
Automated vs manual testing
Automated vs manual testingAutomated vs manual testing
Automated vs manual testing
Kanoah
 

Viewers also liked (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
Blezard CRM Consulting Ltd
 
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 Developers
 
Salesforce Testing Resume
Salesforce Testing ResumeSalesforce Testing Resume
Salesforce Testing Resume
Sowmya J
 
Testing Salesforce at Cloud Scale
Testing Salesforce at Cloud ScaleTesting Salesforce at Cloud Scale
Testing Salesforce at Cloud Scale
gwestr
 
Cowboy tools and attire
Cowboy tools and attireCowboy tools and attire
Cowboy tools and attire
ChristianN2T
 
Sustainable Leadership
Sustainable LeadershipSustainable Leadership
Sustainable Leadership
Laura Pasquini
 
Merchandising Portfolio
Merchandising PortfolioMerchandising Portfolio
Merchandising Portfolio
darious
 
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
IslamAlMallah
 
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
marcdanny68
 
Alternative teaching strategies
Alternative teaching strategiesAlternative teaching strategies
Alternative teaching strategies
Montessori Center
 
Gas transfer
Gas transferGas transfer
Gas transfer
Preeti Birwal
 
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
d0466594
 
OSMOTIC DRUG DELIVERY SYSTEM
OSMOTIC DRUG DELIVERY SYSTEMOSMOTIC DRUG DELIVERY SYSTEM
OSMOTIC DRUG DELIVERY SYSTEM
Riteksha Patel
 
Crafting an Engagement Strategy
Crafting an Engagement StrategyCrafting an Engagement Strategy
Crafting an Engagement Strategy
Eric 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 management
Neelam Yadav
 
Storm water drainage
Storm water drainageStorm water drainage
Storm water drainage
Avneet Dhillon
 
How to plan your sales territory
How to plan your sales territoryHow to plan your sales territory
How to plan your sales territory
Camilo Rojas
 
ERP Module Finance
ERP Module FinanceERP Module Finance
ERP Module Finance
Ashok 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 face
Rajesh Bariker
 
Fame analysis techniques
Fame analysis techniquesFame analysis techniques
Fame analysis techniques
Sarfaraz Nasri
 
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 Developers
 
Salesforce Testing Resume
Salesforce Testing ResumeSalesforce Testing Resume
Salesforce Testing Resume
Sowmya J
 
Testing Salesforce at Cloud Scale
Testing Salesforce at Cloud ScaleTesting Salesforce at Cloud Scale
Testing Salesforce at Cloud Scale
gwestr
 
Cowboy tools and attire
Cowboy tools and attireCowboy tools and attire
Cowboy tools and attire
ChristianN2T
 
Sustainable Leadership
Sustainable LeadershipSustainable Leadership
Sustainable Leadership
Laura Pasquini
 
Merchandising Portfolio
Merchandising PortfolioMerchandising Portfolio
Merchandising Portfolio
darious
 
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
IslamAlMallah
 
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
marcdanny68
 
Alternative teaching strategies
Alternative teaching strategiesAlternative teaching strategies
Alternative teaching strategies
Montessori 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 Needs
d0466594
 
OSMOTIC DRUG DELIVERY SYSTEM
OSMOTIC DRUG DELIVERY SYSTEMOSMOTIC DRUG DELIVERY SYSTEM
OSMOTIC DRUG DELIVERY SYSTEM
Riteksha Patel
 
Crafting an Engagement Strategy
Crafting an Engagement StrategyCrafting an Engagement Strategy
Crafting an Engagement Strategy
Eric 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 management
Neelam Yadav
 
How to plan your sales territory
How to plan your sales territoryHow to plan your sales territory
How to plan your sales territory
Camilo Rojas
 
ERP Module Finance
ERP Module FinanceERP Module Finance
ERP Module Finance
Ashok 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 face
Rajesh Bariker
 
Fame analysis techniques
Fame analysis techniquesFame analysis techniques
Fame analysis techniques
Sarfaraz Nasri
 
Ad

Similar to 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
David 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
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
Khaja Moiz Uddin
 
Resume_Sivasankaraiah Poli
Resume_Sivasankaraiah PoliResume_Sivasankaraiah Poli
Resume_Sivasankaraiah Poli
Siva 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
Phil 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 test
Peter Lindberg
 
QAorHighway2016
QAorHighway2016QAorHighway2016
QAorHighway2016
Bhupesh Dahal
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014
Wojciech 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 Carmi
Applitools
 
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
SHASHI JAISWAL
 
Software Testing Tools Training
Software Testing Tools TrainingSoftware Testing Tools Training
Software Testing Tools Training
QEdge Tech
 
Cross browser Testing JavaScript
Cross browser Testing JavaScriptCross browser Testing JavaScript
Cross browser Testing JavaScript
Alan Parkinson
 
Testing Angular
Testing AngularTesting Angular
Testing Angular
Lilia Sfaxi
 
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
TechWell
 
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
Ankita Gupta
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
Simon Guest
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
Slobodan Lohja
 
Selenium And Its Types
Selenium And Its TypesSelenium And Its Types
Selenium And Its Types
PriyanshuDutta2
 
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
David 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 Poli
Siva 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
Phil 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 test
Peter Lindberg
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014
Wojciech 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 Carmi
Applitools
 
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
SHASHI JAISWAL
 
Software Testing Tools Training
Software Testing Tools TrainingSoftware Testing Tools Training
Software Testing Tools Training
QEdge Tech
 
Cross browser Testing JavaScript
Cross browser Testing JavaScriptCross browser Testing JavaScript
Cross browser Testing JavaScript
Alan 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 Success
TechWell
 
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
Ankita Gupta
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
Simon Guest
 
Ad

More from 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
Salesforce Engineering
 
Scaling HBase for Big Data
Scaling HBase for Big DataScaling HBase for Big Data
Scaling HBase for Big Data
Salesforce 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 Cloud
Salesforce Engineering
 
Predictive System Performance Data Analysis
Predictive System Performance Data AnalysisPredictive System Performance Data Analysis
Predictive System Performance Data Analysis
Salesforce Engineering
 
Apache HBase State of the Project
Apache HBase State of the ProjectApache HBase State of the Project
Apache HBase State of the Project
Salesforce Engineering
 
Hit the Trail with Trailhead
Hit the Trail with TrailheadHit the Trail with Trailhead
Hit the Trail with Trailhead
Salesforce Engineering
 
HBase/PHOENIX @ Scale
HBase/PHOENIX @ ScaleHBase/PHOENIX @ Scale
HBase/PHOENIX @ Scale
Salesforce Engineering
 
Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applications
Salesforce Engineering
 
Containers and Security for DevOps
Containers and Security for DevOpsContainers and Security for DevOps
Containers and Security for DevOps
Salesforce 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 Have
Salesforce Engineering
 
Monitoring @ Scale in Salesforce
Monitoring @ Scale in SalesforceMonitoring @ Scale in Salesforce
Monitoring @ Scale in Salesforce
Salesforce Engineering
 
Performance Tuning with XHProf
Performance Tuning with XHProfPerformance Tuning with XHProf
Performance Tuning with XHProf
Salesforce 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 Calcite
Salesforce 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 Miles
Salesforce 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 Overview
Salesforce Engineering
 
Koober Preduction IO Presentation
Koober Preduction IO PresentationKoober Preduction IO Presentation
Koober Preduction IO Presentation
Salesforce Engineering
 
Finding Security Issues Fast!
Finding Security Issues Fast!Finding Security Issues Fast!
Finding Security Issues Fast!
Salesforce Engineering
 
Microservices
MicroservicesMicroservices
Microservices
Salesforce Engineering
 
Global State Management of Micro Services
Global State Management of Micro ServicesGlobal State Management of Micro Services
Global State Management of Micro Services
Salesforce Engineering
 
The Future of Hbase
The Future of HbaseThe Future of Hbase
The Future of Hbase
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 Webpack
Salesforce 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 Cloud
Salesforce Engineering
 
Predictive System Performance Data Analysis
Predictive System Performance Data AnalysisPredictive System Performance Data Analysis
Predictive System Performance Data Analysis
Salesforce 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 Have
Salesforce 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 Calcite
Salesforce 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 Miles
Salesforce 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 Overview
Salesforce Engineering
 
Global State Management of Micro Services
Global State Management of Micro ServicesGlobal State Management of Micro Services
Global State Management of Micro Services
Salesforce Engineering
 

Recently uploaded (20)

Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 

Selenium at Salesforce Scale

  • 1. Selenium at Salesforce Scale David Louvton Lead Engineer [email protected] Sagar Wanaselja Lead Engineer
  • 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
  • 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
  • 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