SlideShare a Scribd company logo
2
Most read
3
Most read
Autom ation Best
Practices
L eo L a s k in , T es t Au t om a t ion Ad v is or
About Me
• Twitter: @LeoLaskin
• LinkedIn: https://www.linkedin.com/in/llaskin
• Email: leo@saucelabs.com
© Sauce Labs, Inc. 2
Manual Tests
© Sauce Labs, Inc. 3
No Manual Tests*
*	Testing	Extreme	Programming	 by	Lisa	Crispin	and	
Tip	House
Start with a Clean System
• Having a clean system every time is paramount for
reproducible results
• SaaS grid based systems can be setup to be fresh
with no system cache, browser cache, cookies, etc.
© Sauce Labs, Inc. 4
Parallelizatio n
• Serialized tests take more time and cost more
money
• Using a Selenium Grid like Sauce Labs,
parallelized tests can spin up multiple
browsers for you or multiple tests
simultaneously
• 300 minute long tests can take either 5 hours
or as little as 1 minute.
© Sauce Labs, Inc. 5
Page Object Pattern
• Encourage reusable code throughout your test app
• Test code more organized for update if test
parameters like selectors change
• Tests are more readable with a natural feeling
Domain-Specific Language(DSL)
© Sauce Labs, Inc. 6
Test Constantly
• Don’t ever stop testing
• Having tests run on every commit is going to provide
significantly higher confidence in your software
• You have unlimited amounts of time to test. Use it!
© Sauce Labs, Inc. 7
Speed things up
• The average attention span of an adult is less then 5
minutes
• Try to provide results before context is switched
• Make the devs work for you not against you
© Sauce Labs, Inc. 8
Start Small
• Don’t rush to automate every test case
• Identify test case priority then automate
• Don’t automate end-to-end
• Divide and conquer
© Sauce Labs, Inc. 9
Divide your testing up
• By Functional Area
• By hosted server
• By backend server
© Sauce Labs, Inc. 10
Automation = Development Activity
• Automation is a real development endeavor, treat it
as such
• Beware of Cowboy Coding
• Copy/Pasting inside your code can be replaced by
reusable methods
• Source control is cheap insurance
• Bad coding practices = bad testing practices (and
vice versa)
© Sauce Labs, Inc. 11
Don’t Forget to Wait!
• Web pages don’t load instantaneously, and not all
elements load at the same time
• A lot of your failures in finding an element will
disappear if you use these
• Explicit or fluent waits are preferred for waiting for
single elements
• Implicit waits for waiting all the time
• Fluent waits for elements that can take variable time
to load
© Sauce Labs, Inc. 12
Avoid Dependencies
• Don’t allow tests to be dependent on each other
• One test’s actions should not drive another tests
assertion criteria
© Sauce Labs, Inc. 13
Prep Your Environment
• Make sure your CI rig can handle the number of jobs
running on it simultaneously
• Make sure your SUT can handle the number of tests
running on it simultaneously
© Sauce Labs, Inc. 14
Collect Metrics
• How long did test runs take before and after
automation?
• How many bugs do automated tests identify per
release?
• How many engineers does a test run require?
© Sauce Labs, Inc. 15
SAUCE LABS RESOURCES
February 29, 2016 © Sauce Labs, Inc.
• Sign up for a free trial of Sauce
https://saucelabs.com/signup/trial
• Check out our docs on Automation and how to use
Sauce at https://wiki.saucelabs.com
16

More Related Content

PPT
Test Automation Best Practices (with SOA test approach)
PPT
Test Automation Strategies For Agile
PDF
Test Automation - Keytorc Approach
PPT
Test automation process
PPTX
Test automation proposal
PDF
Test Automation Framework Design | www.idexcel.com
PDF
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
PPT
Automation testing strategy, approach & planning
Test Automation Best Practices (with SOA test approach)
Test Automation Strategies For Agile
Test Automation - Keytorc Approach
Test automation process
Test automation proposal
Test Automation Framework Design | www.idexcel.com
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
Automation testing strategy, approach & planning

What's hot (20)

PPT
Test Management introduction
PDF
Building a Test Automation Strategy for Success
PPT
Automated Testing with Agile
PDF
Test Automation
PDF
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
PPTX
Test automation
PPT
Software Testing Process
PPT
Test Automation Framework Designs
PPTX
Best practices for test automation
PDF
PDF
Test Automation
PPTX
Types of performance testing
PPTX
Automation Testing
PDF
Shift Left & Shift Right Approach in Testing
PPTX
Testing strategy for agile projects updated
PPTX
Introduction to Automation Testing
PPTX
Test planning
PPTX
Istqb foundation level day 1
PPTX
Test Automation in Agile
PDF
Transforming Your QA and Test Team
Test Management introduction
Building a Test Automation Strategy for Success
Automated Testing with Agile
Test Automation
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
Test automation
Software Testing Process
Test Automation Framework Designs
Best practices for test automation
Test Automation
Types of performance testing
Automation Testing
Shift Left & Shift Right Approach in Testing
Testing strategy for agile projects updated
Introduction to Automation Testing
Test planning
Istqb foundation level day 1
Test Automation in Agile
Transforming Your QA and Test Team
Ad

Viewers also liked (16)

PDF
Design Patterns for Scalable Test Automation With Selenium & WebdriverIO
PPTX
Best Practices in Mobile CI (webinar)
PDF
Transitioning from Traditional to Modern QA
PPTX
Getting Started with Mobile Test Automation & Appium
PDF
Selenium Tips & Tricks
PDF
How to Use Selenium, Successfully
PDF
Easy Continuous Deployment You Can Trust (Webinar)
PDF
Testing Code.org's Interactive CS Curriculum
POTX
Simplify CI with the Updated Jenkins Plugin for Sauce Labs
PPTX
Beyond the Release: CI That Transforms Organizations
PDF
10 things you didnt know about appium + whats new in appium 1.5
PPTX
Continuous Testing in the Cloud
PPTX
Moving From a Selenium Grid to the Cloud - A Real Life Story
PDF
How To Use Selenium Successfully (Java Edition)
PPTX
Sauce Labs for Visual Studio Team Services & TFS
PDF
10 Benefits of Automated Testing
Design Patterns for Scalable Test Automation With Selenium & WebdriverIO
Best Practices in Mobile CI (webinar)
Transitioning from Traditional to Modern QA
Getting Started with Mobile Test Automation & Appium
Selenium Tips & Tricks
How to Use Selenium, Successfully
Easy Continuous Deployment You Can Trust (Webinar)
Testing Code.org's Interactive CS Curriculum
Simplify CI with the Updated Jenkins Plugin for Sauce Labs
Beyond the Release: CI That Transforms Organizations
10 things you didnt know about appium + whats new in appium 1.5
Continuous Testing in the Cloud
Moving From a Selenium Grid to the Cloud - A Real Life Story
How To Use Selenium Successfully (Java Edition)
Sauce Labs for Visual Studio Team Services & TFS
10 Benefits of Automated Testing
Ad

Similar to Automation Best Practices (20)

PDF
Build Fail-Proof Tests in Any Browser with Selenium
PDF
5 Steps to Jump Start Your Test Automation
PDF
Chaos Engineering - Limiting Damage During Chaos Experiments
PDF
Continuous Testing in the Cloud
PPTX
Load testing with Visual Studio and Azure - Andrew Siemer
PPTX
Road to Continuous Delivery - Wix.com
PPTX
2016 - Fail Proof Ways to Run Beautiful Tests Regardless Of Browser Choice
PDF
Zero to Test Driven Infrastructure
PPTX
AUTOMATION TESTING tools extensive application
PPTX
Getting Started With Selenium
PDF
Mini-Training: Netflix Simian Army
PDF
SauceCon 2017: Making Your Mobile App Automatable
PPTX
Continuous Integration Testing for SAP
PPTX
How to make your functional tests really quick
PPTX
Dev ops for mobile apps at microsoft teams
PPTX
Tdd using Jasmine and karma
PDF
Test Automation using UiPath Test Suite - Developer Circle Part-3 - 07262022.pdf
PPTX
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
PPTX
JavaOne 2016 - CON3080 - Testing Java Web Applications with Selenium: A Cookbook
PPTX
Testing for Logic App Solutions | Integration Monday
Build Fail-Proof Tests in Any Browser with Selenium
5 Steps to Jump Start Your Test Automation
Chaos Engineering - Limiting Damage During Chaos Experiments
Continuous Testing in the Cloud
Load testing with Visual Studio and Azure - Andrew Siemer
Road to Continuous Delivery - Wix.com
2016 - Fail Proof Ways to Run Beautiful Tests Regardless Of Browser Choice
Zero to Test Driven Infrastructure
AUTOMATION TESTING tools extensive application
Getting Started With Selenium
Mini-Training: Netflix Simian Army
SauceCon 2017: Making Your Mobile App Automatable
Continuous Integration Testing for SAP
How to make your functional tests really quick
Dev ops for mobile apps at microsoft teams
Tdd using Jasmine and karma
Test Automation using UiPath Test Suite - Developer Circle Part-3 - 07262022.pdf
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
JavaOne 2016 - CON3080 - Testing Java Web Applications with Selenium: A Cookbook
Testing for Logic App Solutions | Integration Monday

More from Sauce Labs (20)

PDF
Simplify Salesforce Testing with AI-Driven Codeless Tools
PDF
Testing on Mobile Devices with Location Services
PDF
Your Framework for Success: introduction to JavaScript Testing at Scale
PDF
Automating Hybrid Applications with Appium
PDF
Quality at Speed: More API Testing, Less UI Testing
PPTX
Creating Digital Confidence with Test Automation
PDF
Just Enough (Automated) Testing
PDF
Using Axe to Add Accessibility Checks to Your Existing Selenium Tests
PDF
How Open Source Helps to Bring Back Product Obsession
PDF
Webinar: A Sneak Peek at Selenium 4 with Simon Stewart
PDF
[Deu] Test Automatisierung Mit Web Driver.io
PDF
Accelerating Innovation: Leveraging Open Source to Optimize Your Shift-Left I...
PDF
Accelerating Your Digital Agenda with Continuous Testing ft. Forrester
PDF
How to Measure Success in Continuous Testing
PDF
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
PDF
Sauce Labs Webinar: Rising Importance of Software Testing
PDF
BDD With Selenide by Hima Bindu Peteti
PDF
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
PDF
Continuous Delivery for "Mature" Codebases by Melisa Benua
PDF
Building Automation Engineers From Scratch by Jenny Bramble
Simplify Salesforce Testing with AI-Driven Codeless Tools
Testing on Mobile Devices with Location Services
Your Framework for Success: introduction to JavaScript Testing at Scale
Automating Hybrid Applications with Appium
Quality at Speed: More API Testing, Less UI Testing
Creating Digital Confidence with Test Automation
Just Enough (Automated) Testing
Using Axe to Add Accessibility Checks to Your Existing Selenium Tests
How Open Source Helps to Bring Back Product Obsession
Webinar: A Sneak Peek at Selenium 4 with Simon Stewart
[Deu] Test Automatisierung Mit Web Driver.io
Accelerating Innovation: Leveraging Open Source to Optimize Your Shift-Left I...
Accelerating Your Digital Agenda with Continuous Testing ft. Forrester
How to Measure Success in Continuous Testing
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
Sauce Labs Webinar: Rising Importance of Software Testing
BDD With Selenide by Hima Bindu Peteti
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Continuous Delivery for "Mature" Codebases by Melisa Benua
Building Automation Engineers From Scratch by Jenny Bramble

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Advanced IT Governance
The AUB Centre for AI in Media Proposal.docx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
MYSQL Presentation for SQL database connectivity
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Empathic Computing: Creating Shared Understanding
Advanced Soft Computing BINUS July 2025.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
GamePlan Trading System Review: Professional Trader's Honest Take
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
Advanced IT Governance

Automation Best Practices

  • 1. Autom ation Best Practices L eo L a s k in , T es t Au t om a t ion Ad v is or
  • 2. About Me • Twitter: @LeoLaskin • LinkedIn: https://www.linkedin.com/in/llaskin • Email: leo@saucelabs.com © Sauce Labs, Inc. 2
  • 3. Manual Tests © Sauce Labs, Inc. 3 No Manual Tests* * Testing Extreme Programming by Lisa Crispin and Tip House
  • 4. Start with a Clean System • Having a clean system every time is paramount for reproducible results • SaaS grid based systems can be setup to be fresh with no system cache, browser cache, cookies, etc. © Sauce Labs, Inc. 4
  • 5. Parallelizatio n • Serialized tests take more time and cost more money • Using a Selenium Grid like Sauce Labs, parallelized tests can spin up multiple browsers for you or multiple tests simultaneously • 300 minute long tests can take either 5 hours or as little as 1 minute. © Sauce Labs, Inc. 5
  • 6. Page Object Pattern • Encourage reusable code throughout your test app • Test code more organized for update if test parameters like selectors change • Tests are more readable with a natural feeling Domain-Specific Language(DSL) © Sauce Labs, Inc. 6
  • 7. Test Constantly • Don’t ever stop testing • Having tests run on every commit is going to provide significantly higher confidence in your software • You have unlimited amounts of time to test. Use it! © Sauce Labs, Inc. 7
  • 8. Speed things up • The average attention span of an adult is less then 5 minutes • Try to provide results before context is switched • Make the devs work for you not against you © Sauce Labs, Inc. 8
  • 9. Start Small • Don’t rush to automate every test case • Identify test case priority then automate • Don’t automate end-to-end • Divide and conquer © Sauce Labs, Inc. 9
  • 10. Divide your testing up • By Functional Area • By hosted server • By backend server © Sauce Labs, Inc. 10
  • 11. Automation = Development Activity • Automation is a real development endeavor, treat it as such • Beware of Cowboy Coding • Copy/Pasting inside your code can be replaced by reusable methods • Source control is cheap insurance • Bad coding practices = bad testing practices (and vice versa) © Sauce Labs, Inc. 11
  • 12. Don’t Forget to Wait! • Web pages don’t load instantaneously, and not all elements load at the same time • A lot of your failures in finding an element will disappear if you use these • Explicit or fluent waits are preferred for waiting for single elements • Implicit waits for waiting all the time • Fluent waits for elements that can take variable time to load © Sauce Labs, Inc. 12
  • 13. Avoid Dependencies • Don’t allow tests to be dependent on each other • One test’s actions should not drive another tests assertion criteria © Sauce Labs, Inc. 13
  • 14. Prep Your Environment • Make sure your CI rig can handle the number of jobs running on it simultaneously • Make sure your SUT can handle the number of tests running on it simultaneously © Sauce Labs, Inc. 14
  • 15. Collect Metrics • How long did test runs take before and after automation? • How many bugs do automated tests identify per release? • How many engineers does a test run require? © Sauce Labs, Inc. 15
  • 16. SAUCE LABS RESOURCES February 29, 2016 © Sauce Labs, Inc. • Sign up for a free trial of Sauce https://saucelabs.com/signup/trial • Check out our docs on Automation and how to use Sauce at https://wiki.saucelabs.com 16