SlideShare uma empresa Scribd logo
1 de 42
Baixar para ler offline
1
James Farrier
From - Auckland New Zealand
Studied - Software Engineering
Been working in Test Automation for 12 years
Recently founded Appsurify
About Me
With less time
(thanks Agile!)
we need to
improve our
testing efficiency
3
Test Automation Challenges
Tests Are
Unreliable
Failures
Are
Expected
Unreliable
Tests Are
Hard To Fix
Tests Stop
Being Run
Tests Take
Too Long
To Run
What causes
unreliable
automation?
● Async waits: Thread.sleep
● Concurrency: data races, atomicity violations, or
deadlocks
● Test order dependency
● Resource leak
● Network
● Time
● I/O
● Randomness
● Floating point operations
● Unordered collections
● Device losing connectivity or power
● Browser crash
● PC or phone downloading update
● 3rd party systems
● Caching
● Setup/clean-up/teardown issues
● Elements in motion
74% of test
failures at Google
are caused by
Flaky Tests
Almost 16% of our tests have some level of flakiness
associated with them!
John Micco, Google
“
How can we
handle flaky
tests?
How can we
handle flaky
tests?
● Use ID’s
● https://github.com/testdotai
● Mocks
● Hermetic, can run in isolation
● WaitUntil, Fluent or Explicit Waits,
not Thread.Sleep
● Use frameworks
● But process is more important
because you can’t fix them all
Manually remove
flaky tests from
test runs
Manually remove
flaky tests from
test runs
Advantages Disadvantages
● Easy to get started
● Tests can continue to
be run, potentially
finding bugs
● Stops flaky tests
breaking the build
● Difficult to scale
● Can lose track of tests
● Requires setting up
multiple test runs
Delete flaky tests
Delete flaky tests
Advantages Disadvantages
● Easy
● Scales
● Stops flaky tests
breaking the build
● Misses defects
● Eventually recreate
the same tests
● Disheartening
Fix flaky tests
Fix flaky tests
Advantages Disadvantages
● Tests continue to run
and find bugs
● Leads to better
practices creating
tests
● Stops flaky tests
breaking the build
● Difficult to scale
● Difficult to reproduce
● Difficult to fix
● May not be caused by
tests themselves (i.e.
third party)
● May not be possible
● Tests need to be
removed while being
fixed, bugs maybe
missed
● Should be combined
with another process
99.9% isn’t reliable enough! If your build contains
1000 tests which are 99.9% reliable your build will
break 73% of the time
“
Bots for flaky tests
Bots for flaky tests
Bots for flaky tests
Advantages Disadvantages
● No manual
intervention required
● Scales
● Stops flaky tests
breaking the build
● Reasonably
technical/difficult
setup
● May miss defects
because of tests not
being run
Results from - Bots
for flaky tests
Results from - Bots
for flaky tests
What if all the
tests are flaky?
Flaky tests are still
valuable and can
still find new
defects
Rerun flaky tests
Rerun flaky tests
Advantages Disadvantages
● No manual
intervention required
● Scales
● Tests continue to run
and find bugs
● Stops flaky tests
breaking the build
● Reasonably
technical/difficult
setup
● How many times
should you rerun a
test?
● Can greatly increase
test execution time,
when you need this to
be as short as possible
Quarantine failure
reasons for flaky
tests
Results from -
Quarantine failure
reasons for flaky
tests
Quarantine failure
reasons for flaky
tests
Advantages Disadvantages
● Tests continue to run
and find bugs
● Scales
● Stops flaky tests
breaking the build
● Reasonably
technical/difficult
setup
● Failures need to be
marked as flaky
● Flaky tests still
initially fail the build
Using a
classification
algorithm to
detect flaky tests
and then
quarantine the
flaky results
Which is likely to
be Flaky? Failure
early in the test or
at late?
Some of the most
common failures
with Selenium
occur early i.e.
Browser setup
Which is likely to
be Flaky? Error or
Assert Failure?
Which is likely to
be Flaky? If we
change Transfers
section a
Transfers test that
fails or a Payment
test that fails?
Which is likely to
be Flaky? New
Failure or an error
that’s caused
flaky failures
before?
Which is likely to
be Flaky? A test
that has never
flaked before or a
test that looks like
Xmas lights?
Risky change is
more likely to
have real defects
than flaky failures
How do we know
if it’s a risky
change? What is
the change and
who completed
it?
Sometimes devs
even tell you
when something
is likely to have a
bug
Classification
algorithm for flaky
tests
Advantages Disadvantages
● Tests continue to run
and find bugs
● No manual
intervention required
● Scales
● Stops flaky tests
breaking the build
● Reasonably
technical/difficult
setup, unless you use
Appsurify!
● To learn failures need
to be initially marked
as flaky
Run a prioritized
set of tests
targeted at the
change
99.9% is reliable enough!?!? If your build contains
1000 tests which are 99.9% reliable, if you only run 50
for a change then your build will break only 5% of the
time, compared to 74% if you run all the tests.
“
Run a prioritized
set of tests
targeted at the
change
Advantages Disadvantages
● Tests continue to run
and find bugs
● No manual
intervention required
● Scales
● Faster run time
● Stops flaky tests
breaking the build
● Reasonably
technical/difficult
setup, unless you use
Appsurify!
● Needs to be combined
with another
technique for
handling flaky failures
james@appsurify.com
Thanks for Listening

Mais conteúdo relacionado

Mais procurados

Sustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey ShannahanSustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey ShannahanQA or the Highway
 
Testing in-production
Testing in-productionTesting in-production
Testing in-productionEvgeny Rahman
 
Exploratory Testing
Exploratory TestingExploratory Testing
Exploratory Testingsriks7
 
Reliable tests with selenium web driver
Reliable tests with selenium web driverReliable tests with selenium web driver
Reliable tests with selenium web driverPawelPabich
 
Scaling Your Tests: Continued Change Without Fear
Scaling Your Tests: Continued Change Without FearScaling Your Tests: Continued Change Without Fear
Scaling Your Tests: Continued Change Without FearTechWell
 
From Gatekeeper to Partner by Kelsey Shannahan
From Gatekeeper to Partner by Kelsey ShannahanFrom Gatekeeper to Partner by Kelsey Shannahan
From Gatekeeper to Partner by Kelsey ShannahanQA or the Highway
 
What a DevOps specialist has to know about static code analysis
What a DevOps specialist has to know about static code analysisWhat a DevOps specialist has to know about static code analysis
What a DevOps specialist has to know about static code analysisAndrey Karpov
 
Joe Beale - Automation is What We Do
Joe Beale - Automation is What We DoJoe Beale - Automation is What We Do
Joe Beale - Automation is What We DoQA or the Highway
 
Why Your Selenium Tests are so Dang Brittle, and What to Do About It
Why Your Selenium Tests are so Dang Brittle, and What to Do About ItWhy Your Selenium Tests are so Dang Brittle, and What to Do About It
Why Your Selenium Tests are so Dang Brittle, and What to Do About ItJay Aho
 
Way to Agile - USTH
Way to Agile - USTHWay to Agile - USTH
Way to Agile - USTHHien Nguyen
 
There's no time to test, can you just automate it? by Anna Heiermann
There's no time to test, can you just automate it? by Anna HeiermannThere's no time to test, can you just automate it? by Anna Heiermann
There's no time to test, can you just automate it? by Anna HeiermannQA or the Highway
 
AiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 bAiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 bAiTi Education
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...TEST Huddle
 
Optimize Your Team for Tough Times
Optimize Your Team for Tough TimesOptimize Your Team for Tough Times
Optimize Your Team for Tough TimesTerry Martin
 
Move test planning before implementation
Move test planning before implementationMove test planning before implementation
Move test planning before implementationTed Cheng
 
I Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application TestingI Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application TestingPeter Presnell
 
Hey You Got Your TDD in my SQL DB by Jeff McKenzie
Hey You Got Your TDD in my SQL DB by Jeff McKenzieHey You Got Your TDD in my SQL DB by Jeff McKenzie
Hey You Got Your TDD in my SQL DB by Jeff McKenzieQA or the Highway
 

Mais procurados (20)

[Thao Vo] Deadly Traps of Automation Testing
[Thao Vo] Deadly Traps of Automation Testing[Thao Vo] Deadly Traps of Automation Testing
[Thao Vo] Deadly Traps of Automation Testing
 
Sustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey ShannahanSustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey Shannahan
 
Testing in-production
Testing in-productionTesting in-production
Testing in-production
 
Exploratory Testing
Exploratory TestingExploratory Testing
Exploratory Testing
 
Reliable tests with selenium web driver
Reliable tests with selenium web driverReliable tests with selenium web driver
Reliable tests with selenium web driver
 
Scaling Your Tests: Continued Change Without Fear
Scaling Your Tests: Continued Change Without FearScaling Your Tests: Continued Change Without Fear
Scaling Your Tests: Continued Change Without Fear
 
From Gatekeeper to Partner by Kelsey Shannahan
From Gatekeeper to Partner by Kelsey ShannahanFrom Gatekeeper to Partner by Kelsey Shannahan
From Gatekeeper to Partner by Kelsey Shannahan
 
What a DevOps specialist has to know about static code analysis
What a DevOps specialist has to know about static code analysisWhat a DevOps specialist has to know about static code analysis
What a DevOps specialist has to know about static code analysis
 
Joe Beale - Automation is What We Do
Joe Beale - Automation is What We DoJoe Beale - Automation is What We Do
Joe Beale - Automation is What We Do
 
Why Your Selenium Tests are so Dang Brittle, and What to Do About It
Why Your Selenium Tests are so Dang Brittle, and What to Do About ItWhy Your Selenium Tests are so Dang Brittle, and What to Do About It
Why Your Selenium Tests are so Dang Brittle, and What to Do About It
 
Way to Agile - USTH
Way to Agile - USTHWay to Agile - USTH
Way to Agile - USTH
 
There's no time to test, can you just automate it? by Anna Heiermann
There's no time to test, can you just automate it? by Anna HeiermannThere's no time to test, can you just automate it? by Anna Heiermann
There's no time to test, can you just automate it? by Anna Heiermann
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
AiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 bAiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 b
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
 
Optimize Your Team for Tough Times
Optimize Your Team for Tough TimesOptimize Your Team for Tough Times
Optimize Your Team for Tough Times
 
Move test planning before implementation
Move test planning before implementationMove test planning before implementation
Move test planning before implementation
 
I Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application TestingI Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application Testing
 
Hey You Got Your TDD in my SQL DB by Jeff McKenzie
Hey You Got Your TDD in my SQL DB by Jeff McKenzieHey You Got Your TDD in my SQL DB by Jeff McKenzie
Hey You Got Your TDD in my SQL DB by Jeff McKenzie
 

Semelhante a Improve Testing Efficiency With Automation Best Practices

Fantastic Tests - The Crimes of Bad Test Design
Fantastic Tests - The Crimes of Bad Test DesignFantastic Tests - The Crimes of Bad Test Design
Fantastic Tests - The Crimes of Bad Test DesignWinston Laoh
 
Test automation engineer
Test automation engineerTest automation engineer
Test automation engineerSadaaki Emura
 
Are Your Continuous Tests Too Fragile for Agile?
Are Your Continuous Tests Too Fragile for Agile?Are Your Continuous Tests Too Fragile for Agile?
Are Your Continuous Tests Too Fragile for Agile?Parasoft
 
Fundamentals of testing
Fundamentals of testingFundamentals of testing
Fundamentals of testingBugRaptors
 
Manage Testing by Dependencies—Not Activities
Manage Testing by Dependencies—Not ActivitiesManage Testing by Dependencies—Not Activities
Manage Testing by Dependencies—Not ActivitiesTechWell
 
Creating testing tools to support development
Creating testing tools to support developmentCreating testing tools to support development
Creating testing tools to support developmentChema del Barco
 
A lean automation blueprint for testing in continuous delivery
A lean automation blueprint for testing in continuous deliveryA lean automation blueprint for testing in continuous delivery
A lean automation blueprint for testing in continuous deliverySauce Labs
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test AutomationSauce Labs
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingCameron Presley
 
What Do We Automate First
What Do We Automate FirstWhat Do We Automate First
What Do We Automate Firstrrice2000
 
Boston MeetUp 10.10
Boston MeetUp 10.10Boston MeetUp 10.10
Boston MeetUp 10.10Solano Labs
 
The DevOps Dance - Shift Left, Shift Right - Get It Right
The DevOps Dance - Shift Left, Shift Right - Get It RightThe DevOps Dance - Shift Left, Shift Right - Get It Right
The DevOps Dance - Shift Left, Shift Right - Get It RightInflectra
 
End-to-End Automated Testing: Lessons from Zombieland
End-to-End Automated Testing: Lessons from ZombielandEnd-to-End Automated Testing: Lessons from Zombieland
End-to-End Automated Testing: Lessons from ZombielandJosiah Renaudin
 
How to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingHow to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingTechWell
 
Lessons Learned in Test Automation From Zombieland
Lessons Learned in Test Automation From ZombielandLessons Learned in Test Automation From Zombieland
Lessons Learned in Test Automation From ZombielandMatt Barbour
 
Making disaster routine
Making disaster routineMaking disaster routine
Making disaster routinePeter Varhol
 

Semelhante a Improve Testing Efficiency With Automation Best Practices (20)

Fantastic Tests - The Crimes of Bad Test Design
Fantastic Tests - The Crimes of Bad Test DesignFantastic Tests - The Crimes of Bad Test Design
Fantastic Tests - The Crimes of Bad Test Design
 
Test automation engineer
Test automation engineerTest automation engineer
Test automation engineer
 
Are Your Continuous Tests Too Fragile for Agile?
Are Your Continuous Tests Too Fragile for Agile?Are Your Continuous Tests Too Fragile for Agile?
Are Your Continuous Tests Too Fragile for Agile?
 
NYC MeetUp 10.9
NYC MeetUp 10.9NYC MeetUp 10.9
NYC MeetUp 10.9
 
Fundamentals of testing
Fundamentals of testingFundamentals of testing
Fundamentals of testing
 
Manage Testing by Dependencies—Not Activities
Manage Testing by Dependencies—Not ActivitiesManage Testing by Dependencies—Not Activities
Manage Testing by Dependencies—Not Activities
 
Creating testing tools to support development
Creating testing tools to support developmentCreating testing tools to support development
Creating testing tools to support development
 
A lean automation blueprint for testing in continuous delivery
A lean automation blueprint for testing in continuous deliveryA lean automation blueprint for testing in continuous delivery
A lean automation blueprint for testing in continuous delivery
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation
 
Course Slides.pdf
Course Slides.pdfCourse Slides.pdf
Course Slides.pdf
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To Testing
 
What Do We Automate First
What Do We Automate FirstWhat Do We Automate First
What Do We Automate First
 
Boston MeetUp 10.10
Boston MeetUp 10.10Boston MeetUp 10.10
Boston MeetUp 10.10
 
The DevOps Dance - Shift Left, Shift Right - Get It Right
The DevOps Dance - Shift Left, Shift Right - Get It RightThe DevOps Dance - Shift Left, Shift Right - Get It Right
The DevOps Dance - Shift Left, Shift Right - Get It Right
 
End-to-End Automated Testing: Lessons from Zombieland
End-to-End Automated Testing: Lessons from ZombielandEnd-to-End Automated Testing: Lessons from Zombieland
End-to-End Automated Testing: Lessons from Zombieland
 
How to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingHow to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated Testing
 
Lessons Learned in Test Automation From Zombieland
Lessons Learned in Test Automation From ZombielandLessons Learned in Test Automation From Zombieland
Lessons Learned in Test Automation From Zombieland
 
Fundamentals of testing
Fundamentals of testingFundamentals of testing
Fundamentals of testing
 
Testing Software
Testing SoftwareTesting Software
Testing Software
 
Making disaster routine
Making disaster routineMaking disaster routine
Making disaster routine
 

Último

Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 

Último (20)

Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 

Improve Testing Efficiency With Automation Best Practices

  • 1. 1 James Farrier From - Auckland New Zealand Studied - Software Engineering Been working in Test Automation for 12 years Recently founded Appsurify About Me
  • 2. With less time (thanks Agile!) we need to improve our testing efficiency
  • 3. 3 Test Automation Challenges Tests Are Unreliable Failures Are Expected Unreliable Tests Are Hard To Fix Tests Stop Being Run Tests Take Too Long To Run
  • 4. What causes unreliable automation? ● Async waits: Thread.sleep ● Concurrency: data races, atomicity violations, or deadlocks ● Test order dependency ● Resource leak ● Network ● Time ● I/O ● Randomness ● Floating point operations ● Unordered collections ● Device losing connectivity or power ● Browser crash ● PC or phone downloading update ● 3rd party systems ● Caching ● Setup/clean-up/teardown issues ● Elements in motion
  • 5. 74% of test failures at Google are caused by Flaky Tests
  • 6. Almost 16% of our tests have some level of flakiness associated with them! John Micco, Google “
  • 7. How can we handle flaky tests?
  • 8. How can we handle flaky tests? ● Use ID’s ● https://github.com/testdotai ● Mocks ● Hermetic, can run in isolation ● WaitUntil, Fluent or Explicit Waits, not Thread.Sleep ● Use frameworks ● But process is more important because you can’t fix them all
  • 10. Manually remove flaky tests from test runs Advantages Disadvantages ● Easy to get started ● Tests can continue to be run, potentially finding bugs ● Stops flaky tests breaking the build ● Difficult to scale ● Can lose track of tests ● Requires setting up multiple test runs
  • 12. Delete flaky tests Advantages Disadvantages ● Easy ● Scales ● Stops flaky tests breaking the build ● Misses defects ● Eventually recreate the same tests ● Disheartening
  • 14. Fix flaky tests Advantages Disadvantages ● Tests continue to run and find bugs ● Leads to better practices creating tests ● Stops flaky tests breaking the build ● Difficult to scale ● Difficult to reproduce ● Difficult to fix ● May not be caused by tests themselves (i.e. third party) ● May not be possible ● Tests need to be removed while being fixed, bugs maybe missed ● Should be combined with another process
  • 15. 99.9% isn’t reliable enough! If your build contains 1000 tests which are 99.9% reliable your build will break 73% of the time “
  • 16. Bots for flaky tests
  • 17. Bots for flaky tests
  • 18. Bots for flaky tests Advantages Disadvantages ● No manual intervention required ● Scales ● Stops flaky tests breaking the build ● Reasonably technical/difficult setup ● May miss defects because of tests not being run
  • 19. Results from - Bots for flaky tests
  • 20. Results from - Bots for flaky tests
  • 21. What if all the tests are flaky?
  • 22. Flaky tests are still valuable and can still find new defects
  • 24. Rerun flaky tests Advantages Disadvantages ● No manual intervention required ● Scales ● Tests continue to run and find bugs ● Stops flaky tests breaking the build ● Reasonably technical/difficult setup ● How many times should you rerun a test? ● Can greatly increase test execution time, when you need this to be as short as possible
  • 26. Results from - Quarantine failure reasons for flaky tests
  • 27. Quarantine failure reasons for flaky tests Advantages Disadvantages ● Tests continue to run and find bugs ● Scales ● Stops flaky tests breaking the build ● Reasonably technical/difficult setup ● Failures need to be marked as flaky ● Flaky tests still initially fail the build
  • 28. Using a classification algorithm to detect flaky tests and then quarantine the flaky results
  • 29. Which is likely to be Flaky? Failure early in the test or at late?
  • 30. Some of the most common failures with Selenium occur early i.e. Browser setup
  • 31. Which is likely to be Flaky? Error or Assert Failure?
  • 32. Which is likely to be Flaky? If we change Transfers section a Transfers test that fails or a Payment test that fails?
  • 33. Which is likely to be Flaky? New Failure or an error that’s caused flaky failures before?
  • 34. Which is likely to be Flaky? A test that has never flaked before or a test that looks like Xmas lights?
  • 35. Risky change is more likely to have real defects than flaky failures
  • 36. How do we know if it’s a risky change? What is the change and who completed it?
  • 37. Sometimes devs even tell you when something is likely to have a bug
  • 38. Classification algorithm for flaky tests Advantages Disadvantages ● Tests continue to run and find bugs ● No manual intervention required ● Scales ● Stops flaky tests breaking the build ● Reasonably technical/difficult setup, unless you use Appsurify! ● To learn failures need to be initially marked as flaky
  • 39. Run a prioritized set of tests targeted at the change
  • 40. 99.9% is reliable enough!?!? If your build contains 1000 tests which are 99.9% reliable, if you only run 50 for a change then your build will break only 5% of the time, compared to 74% if you run all the tests. “
  • 41. Run a prioritized set of tests targeted at the change Advantages Disadvantages ● Tests continue to run and find bugs ● No manual intervention required ● Scales ● Faster run time ● Stops flaky tests breaking the build ● Reasonably technical/difficult setup, unless you use Appsurify! ● Needs to be combined with another technique for handling flaky failures