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

What's hot (20)

PDF
Test Automation
rockoder
 
PPTX
Best practices for test automation
David Tzemach
 
PDF
Test Automation Framework Design | www.idexcel.com
Idexcel Technologies
 
PPT
Automated Testing with Agile
Ken McCorkell
 
PPTX
Testing strategy for agile projects updated
Tharinda Liyanage
 
PPT
Scrum Testing Methodology
Gaya1985
 
PDF
Why Should we use Microsoft's Playwright
Knoldus Inc.
 
PPTX
Agile Testing - presentation for Agile User Group
suwalki24.pl
 
PPSX
API Test Automation
SQALab
 
PPTX
Introduction to Agile Testing
Raymond Adrian (Rad) Butalid
 
PPTX
Introduction to Automation Testing
Archana Krushnan
 
PPT
Basic Guide to Manual Testing
Hiral Gosani
 
PPTX
Test Automation in Agile
Agile Testing Alliance
 
PPTX
Hybrid automation framework
doai tran
 
PPTX
Katalon Studio Presentation.pptx
MuhammadHassan440279
 
PPTX
Test Strategy
Zbyszek Mockun
 
PPTX
Exploratory testing using heuristics
Michelle Lagare, CSM
 
PDF
API Testing: The heart of functional testing" with Bj Rollison
TEST Huddle
 
PPTX
Agile Testing and Test Automation
Naveen Kumar Singh
 
PDF
6 Traits of a Successful Test Automation Architecture
Erdem YILDIRIM
 
Test Automation
rockoder
 
Best practices for test automation
David Tzemach
 
Test Automation Framework Design | www.idexcel.com
Idexcel Technologies
 
Automated Testing with Agile
Ken McCorkell
 
Testing strategy for agile projects updated
Tharinda Liyanage
 
Scrum Testing Methodology
Gaya1985
 
Why Should we use Microsoft's Playwright
Knoldus Inc.
 
Agile Testing - presentation for Agile User Group
suwalki24.pl
 
API Test Automation
SQALab
 
Introduction to Agile Testing
Raymond Adrian (Rad) Butalid
 
Introduction to Automation Testing
Archana Krushnan
 
Basic Guide to Manual Testing
Hiral Gosani
 
Test Automation in Agile
Agile Testing Alliance
 
Hybrid automation framework
doai tran
 
Katalon Studio Presentation.pptx
MuhammadHassan440279
 
Test Strategy
Zbyszek Mockun
 
Exploratory testing using heuristics
Michelle Lagare, CSM
 
API Testing: The heart of functional testing" with Bj Rollison
TEST Huddle
 
Agile Testing and Test Automation
Naveen Kumar Singh
 
6 Traits of a Successful Test Automation Architecture
Erdem YILDIRIM
 

Viewers also liked (16)

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

Similar to Automation Best Practices (20)

PDF
Test Automation
nikos batsios
 
PDF
The Ultimate Guide to Test Automation_ Best Practices and Beyond.pdf
flufftailshop
 
PDF
The Ultimate Guide to Test Automation_ Best Practices and Beyond.pdf
kalichargn70th171
 
PDF
5 Steps to Jump Start Your Test Automation
Sauce Labs
 
PDF
How to build confidence in your release cycle
DiUS
 
PDF
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
kalichargn70th171
 
PDF
2019 Testim Webinar: Automation Test Strategy and Design for Agile Teams
TristanLombard1
 
PDF
Understanding the Basics of Automation Testing.pdf
khushnuma khan
 
PPTX
Test automation lesson
Sadaaki Emura
 
PPTX
Optimizing Software Quality with Test Automation Services
Catherine William
 
PDF
Building a Future-Proof Test Automation Strategy: From Planning to Execution
Shubham Joshi
 
PPTX
Test automation engineer
Sadaaki Emura
 
PPTX
It's Automation, Not Automagic
calkelpdiver
 
PPTX
How selenium can transform your qa career
Shama Ugale
 
PPT
Automation Concepts
Nishant Worah
 
PPT
7 steps to Software test automation success
ngowda gowda (Looking For New job in Bangalore
 
PPTX
Insoft training day_1
Sriram Angajala
 
PPTX
5. Automation Testing.pptxSoftawre Quality
tiyaAbid
 
PPTX
Making the Transition from Manual to Automated Testing
Sauce Labs
 
PPTX
Get Max From Automation
BabuDevanandam
 
Test Automation
nikos batsios
 
The Ultimate Guide to Test Automation_ Best Practices and Beyond.pdf
flufftailshop
 
The Ultimate Guide to Test Automation_ Best Practices and Beyond.pdf
kalichargn70th171
 
5 Steps to Jump Start Your Test Automation
Sauce Labs
 
How to build confidence in your release cycle
DiUS
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
kalichargn70th171
 
2019 Testim Webinar: Automation Test Strategy and Design for Agile Teams
TristanLombard1
 
Understanding the Basics of Automation Testing.pdf
khushnuma khan
 
Test automation lesson
Sadaaki Emura
 
Optimizing Software Quality with Test Automation Services
Catherine William
 
Building a Future-Proof Test Automation Strategy: From Planning to Execution
Shubham Joshi
 
Test automation engineer
Sadaaki Emura
 
It's Automation, Not Automagic
calkelpdiver
 
How selenium can transform your qa career
Shama Ugale
 
Automation Concepts
Nishant Worah
 
7 steps to Software test automation success
ngowda gowda (Looking For New job in Bangalore
 
Insoft training day_1
Sriram Angajala
 
5. Automation Testing.pptxSoftawre Quality
tiyaAbid
 
Making the Transition from Manual to Automated Testing
Sauce Labs
 
Get Max From Automation
BabuDevanandam
 
Ad

More from Sauce Labs (20)

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

Recently uploaded (20)

PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Per Axbom: The spectacular lies of maps
Nexer Digital
 
PDF
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Per Axbom: The spectacular lies of maps
Nexer Digital
 
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 

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: [email protected] © 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