SlideShare a Scribd company logo
Your Automated Execution Does Not
Have to be Flaky
Eurostar Webinars Feb 2018
Alan Richardson
www.eviltester.com/flaky
www.compendiumdev.co.uk
@eviltester
@EvilTester 1
Have you experienced flaky test automation? In this webinar, Alan
Richardson plans to convince you that you haven't. Instead you
have experienced the result of not resolving the causes of
Intermittent execution. Alan will explore some common causes and
solutions of intermittent behaviour. Why? So you never say the
phrase, "flaky tests", ever again.
@EvilTester 2
Flaky Test Automation is Normal
@EvilTester 3
Flaky Test Automation is Normal
Because we have normalized Flaky Test
Automation
"Our Tests are Flaky"
"Some tests fail Randomly"
@EvilTester 4
"There is nothing so absurd that it has
not been said by some philosopher."
Cicero, On Divination, Book II chapter LVIII, section 119 ﴾44 BC﴿
"Truth happens to an idea. It becomes
true, is made true by events."
William James, Lecture VI, Pragmatism's Conception of Truth,
Pragmatism: A New Name for Some Old Ways of Thinking ﴾1907﴿
@EvilTester 5
How to Normalize Flaky Test Automation
We all know these Test Automation Truths
"GUI Automation is Flaky"
"We have to live with 'flakiness'"
"We shouldn't automate at the GUI"
"We can only remove flakiness under the GUI"
"Flaky Tests" blames the tests. Not good enough.
@EvilTester 6
It isn't even the "Tests"
We don't automate Tests
We automate the execution of steps in a workflow or process
We automate the execution of a System
We add condition assertions during that execution
We don't have flaky Tests ‐ we have automated execution that fails.
Sometimes on the steps, sometimes on the assertions.
@EvilTester 7
'Flakiness' does not reside at a 'level'
I have seen 'flakiness'
in Unit Tests
in API Tests
in Integration Tests
in GUI Tests
@EvilTester 8
It is too easy to say 'flaky'
and then blame 'GUI execution'
and then blame 'the tool'
Living with flakiness is a choice.
Choose a different approach.
@EvilTester 9
I am not the only person saying this.
see references at the end and name drops throughout
try to cover something different in this talk
@EvilTester 10
"We designed that flakiness. We are allowing that
to happen. We engineered it to be that way. And
its our fault that that exists."
Richard Bradshaw, "Your Tests aren't Flaky, You Are!" Selenium
Conference 2017
https://www.youtube.com/watch?v=XnkWkrbzMh0
@EvilTester 11
Take it more seriously. Describe it
differently.
Intermittent
Occurring at irregular intervals; not continuous or steady.
https://en.oxforddictionaries.com/definition/intermittent
@EvilTester 12
Take it more seriously. Describe it
differently.
Nondeterministic Algorithm
"a nondeterministic algorithm is an algorithm that, even for the
same input, can exhibit different behaviors on different runs"
https://en.wikipedia.org/wiki/Nondeterministic_algorithm
@EvilTester 13
Flaky is not serious enough.
We do not want to use nondeterministic
algorithms for continuous assertions that we are
relying on
@EvilTester 14
Your Test Automation is not Flaky
Your automated execution fails intermittently
@EvilTester 15
Don't Blame Tests. Look For Root Causes.
watch Alister Scott's GTAC 2015 talk
@EvilTester 16
I have removed 'flakiness'
from Unit Tests
from API Tests
from Integration Tests
from GUI Tests
Automated execution does not have to fail intermittently.
@EvilTester 17
How to remove Intermittent Failure from
your Automated Execution
1. Care
2. Investigate
3. Do something about it
@EvilTester 18
How to remove Intermittent Failure from
your Automated Execution
1. Decide Intermittent Failure is unacceptable
2. Investigate the cause of Intermittent Failure
3. Mitigate
Remove the cause
actually fix it
Implement a retry strategy
might obscure bugs
Accept Intermittent Results
might provide hints at solutions
@EvilTester 19
Take it seriously
We write Automate Assertion checking because we care that those
assertions are true for each build of the system.
Determinism is important.
@EvilTester 20
High Level Grouping of Common Causes
of Intermittency
Synchronisation ‐ lack of or poor
Parallel Execution ‐ interference
Long Running Tests ‐ too long, too risky
Automatability ‐ hard to automate system
Tools ‐ inappropriate or out of date
State Preconditions ‐ not controlled
Assertions ‐ wrong or incorrect assumptions
Data ‐ not controlled
see also Richard Bradshaw and Mark Winteringham "SACRED"
Mnemonic.
@EvilTester 21
Will cover Top 3 for each Grouping
@EvilTester 22
Top 3 Common Causes ‐ Synchronisation
None
Time Based Synchronisation
Incorrect App State Synchronisation
@EvilTester 23
Common Solutions ‐ Synchronisation
Synchronise on States
do not rely on framework Synchronisation
Multiple Intermediate States
Consider Latency
Synchronise in Abstractions not the  @Test methods
unless  @Test specific
@EvilTester 24
Top 3 Common Causes ‐ Parallel
Execution
Framework not thread safe
Tests Interfere
Shared Test Environment
@EvilTester 25
Common Solutions ‐ Parallel Execution
Independent environments
Independent Data
Separate Suites rather than threaded execution
Create Threadsafe, reusable code
Create reusable library abstractions rather than
Frameworks
Avoid 'static' singleton objects
@EvilTester 26
Top 3 Common Causes ‐ Long Running
Tests
Sequential rather than Model Based
not delineating between: preconditions, process, assertion
components tests in flow rather than isolation
@EvilTester 27
Common Solutions ‐ Long Running Tests
Understand that more actions == more risk
Synchronise prior to each step
Consider Model Based Testing
Create component test and automated execution playgrounds
Minimum assertions
@EvilTester 28
Top 3 Common Causes ‐ Automatability,
Automatizability
Not Testability:
Application has non‐deterministic behaviour
Hard to Synchronise
Application fails non‐deterministically in live
@EvilTester 29
Common Solutions ‐ Automatability,
Automatizability
Build apps that can be automated
Non‐Deterministic apps need step retry strategies rather than
test retry strategies
@EvilTester 30
Top 3 Common Causes ‐ Tools
Out of Date
Inappropriate
Local Tool Infrastructure
@EvilTester 31
Common Solutions ‐ Tools
Use the right tool for the job
Keep your tooling environment controlled and up to date
Change your approach to take latency into account
process on server return results
return source, process on execution client
@EvilTester 32
Top 3 Common Causes ‐ State
Preconditions
Not Checking State Preconditions at start of test
Not controlling state preconditions prior to test
Precondition setup using same tool
@EvilTester 33
Common Solutions ‐ State Preconditions
control data
precondition state setup ‐ whatever works
http, db, api ‐ 'hack it in'
avoid dependencies between execution unless a long running
test
@EvilTester 34
Top 3 Common Causes ‐ Assumptions
Encoded in Assertions
Assert on an Ordered Set
Assert on Uncontrolled Data
Assertion Tolerences
@EvilTester 35
Common Solutions ‐ Assumptions
Encoded in Assertions
Logging so you can interrogate failure afterwards
Ability to re‐run tests with same data and setup
@EvilTester 36
Top 3 Common Causes ‐ Data
Missing Data
Externally controlled data
Uncontrolled Data
@EvilTester 37
Common Solutions ‐ Data
Create data for each test
Avoid test dependencies
Avoid re‐using data between tests
Check data as a precondition
Data synchronisation on all precondition data
@EvilTester 38
Summary
Your Test Execution is not 'flaky', it is failing intermittently
It is possible to remove intermittent failures, even when
automating through a GUI
Commons solutions: synchronisation, data control,
environmental isolation
@EvilTester 39
Other talks to watch
Alister Scott, GTAC 2015: Your Tests Aren't Flaky
https://www.youtube.com/watch?v=hmk1h40shaE
Richard Bradshaw, "Your Tests aren't Flaky, You Are!" Selenium
Conference 2017
https://www.youtube.com/watch?v=XnkWkrbzMh0
@EvilTester 40
Other talks to watch
Craig Schwarzwald, SAY GOODBYE TO THE “F” WORD … FLAKY
NO MORE!
https://www.youtube.com/watch?v=2K2M7s_Ups0
Mark Winteringham ‐ REST APIs and WebDriver: In Perfect
Harmony
https://www.youtube.com/watch?v=ugAlCZBMOvM
Search also for: Flaky Selenium, Flaky Automation, Flaky Test
Automation
@EvilTester 41
End
Alan Richardson www.compendiumdev.co.uk
Linkedin ‐ @eviltester
Twitter ‐ @eviltester
Instagram ‐ @eviltester
Facebook ‐ @eviltester
Youtube ‐ EvilTesterVideos
Pinterest ‐ @eviltester
Github ‐ @eviltester
Slideshare ‐ @eviltester
@EvilTester 42
BIO
Alan is a Software Development and Testing Coach/Consultant who
enjoys testing at a technical level using techniques from
psychotherapy and computer science. In his spare time Alan is
currently programming a Twitter client called ChatterScan, and
multi‐user text adventure game. Alan is the author of the books
"Dear Evil Tester", "Java For Testers" and "Automating and Testing a
REST API". Alan's main website is compendiumdev.co.uk and he
blogs at blog.eviltester.com
@EvilTester 43

More Related Content

What's hot

Effective Software Testing for Modern Software Development
Effective Software Testing for Modern Software DevelopmentEffective Software Testing for Modern Software Development
Effective Software Testing for Modern Software Development
Alan Richardson
 
Joy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan RichardsonJoy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan Richardson
Alan Richardson
 
Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021
Alan Richardson
 
Automating Strategically or Tactically when Testing
Automating Strategically or Tactically when TestingAutomating Strategically or Tactically when Testing
Automating Strategically or Tactically when Testing
Alan Richardson
 
What is Regression Testing?
What is Regression Testing?What is Regression Testing?
What is Regression Testing?
Alan Richardson
 
Automating Pragmatically - Testival 20190604
Automating Pragmatically - Testival 20190604Automating Pragmatically - Testival 20190604
Automating Pragmatically - Testival 20190604
Alan Richardson
 
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
Alan Richardson
 
Automating to Augment Testing
Automating to Augment TestingAutomating to Augment Testing
Automating to Augment Testing
Alan Richardson
 
Technical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" GameTechnical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" Game
Alan Richardson
 
Practical Test Automation Deep Dive
Practical Test Automation Deep DivePractical Test Automation Deep Dive
Practical Test Automation Deep Dive
Alan Richardson
 
Shift left-testing
Shift left-testingShift left-testing
Shift left-testing
Alan Richardson
 
How to Improve Your Technical Test Ability - AADays 2015 Keynote
How to Improve Your Technical Test Ability - AADays 2015 KeynoteHow to Improve Your Technical Test Ability - AADays 2015 Keynote
How to Improve Your Technical Test Ability - AADays 2015 Keynote
Alan Richardson
 
If you want to automate, you learn to code
If you want to automate, you learn to codeIf you want to automate, you learn to code
If you want to automate, you learn to code
Alan Richardson
 
Confessions of an Accidental Security Tester
Confessions of an Accidental Security TesterConfessions of an Accidental Security Tester
Confessions of an Accidental Security Tester
Alan Richardson
 
Re-thinking Test Automation and Test Process Modelling (in pictures)
Re-thinking Test Automation and Test Process Modelling (in pictures)Re-thinking Test Automation and Test Process Modelling (in pictures)
Re-thinking Test Automation and Test Process Modelling (in pictures)
Alan Richardson
 
TestIstanbul May 2013 Keynote Experiences With Exploratory Testing
TestIstanbul May 2013 Keynote Experiences With Exploratory TestingTestIstanbul May 2013 Keynote Experiences With Exploratory Testing
TestIstanbul May 2013 Keynote Experiences With Exploratory Testing
Alan Richardson
 
Technology Based Testing
Technology Based TestingTechnology Based Testing
Technology Based Testing
Alan Richardson
 
Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014
Alan Richardson
 
Automation vs. intelligence - "follow me if you want to live"
Automation vs. intelligence - "follow me if you want to live"Automation vs. intelligence - "follow me if you want to live"
Automation vs. intelligence - "follow me if you want to live"
Viktor Slavchev
 
Technical Testing Webinar
Technical Testing WebinarTechnical Testing Webinar
Technical Testing Webinar
Alan Richardson
 

What's hot (20)

Effective Software Testing for Modern Software Development
Effective Software Testing for Modern Software DevelopmentEffective Software Testing for Modern Software Development
Effective Software Testing for Modern Software Development
 
Joy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan RichardsonJoy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan Richardson
 
Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021
 
Automating Strategically or Tactically when Testing
Automating Strategically or Tactically when TestingAutomating Strategically or Tactically when Testing
Automating Strategically or Tactically when Testing
 
What is Regression Testing?
What is Regression Testing?What is Regression Testing?
What is Regression Testing?
 
Automating Pragmatically - Testival 20190604
Automating Pragmatically - Testival 20190604Automating Pragmatically - Testival 20190604
Automating Pragmatically - Testival 20190604
 
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
 
Automating to Augment Testing
Automating to Augment TestingAutomating to Augment Testing
Automating to Augment Testing
 
Technical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" GameTechnical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" Game
 
Practical Test Automation Deep Dive
Practical Test Automation Deep DivePractical Test Automation Deep Dive
Practical Test Automation Deep Dive
 
Shift left-testing
Shift left-testingShift left-testing
Shift left-testing
 
How to Improve Your Technical Test Ability - AADays 2015 Keynote
How to Improve Your Technical Test Ability - AADays 2015 KeynoteHow to Improve Your Technical Test Ability - AADays 2015 Keynote
How to Improve Your Technical Test Ability - AADays 2015 Keynote
 
If you want to automate, you learn to code
If you want to automate, you learn to codeIf you want to automate, you learn to code
If you want to automate, you learn to code
 
Confessions of an Accidental Security Tester
Confessions of an Accidental Security TesterConfessions of an Accidental Security Tester
Confessions of an Accidental Security Tester
 
Re-thinking Test Automation and Test Process Modelling (in pictures)
Re-thinking Test Automation and Test Process Modelling (in pictures)Re-thinking Test Automation and Test Process Modelling (in pictures)
Re-thinking Test Automation and Test Process Modelling (in pictures)
 
TestIstanbul May 2013 Keynote Experiences With Exploratory Testing
TestIstanbul May 2013 Keynote Experiences With Exploratory TestingTestIstanbul May 2013 Keynote Experiences With Exploratory Testing
TestIstanbul May 2013 Keynote Experiences With Exploratory Testing
 
Technology Based Testing
Technology Based TestingTechnology Based Testing
Technology Based Testing
 
Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014
 
Automation vs. intelligence - "follow me if you want to live"
Automation vs. intelligence - "follow me if you want to live"Automation vs. intelligence - "follow me if you want to live"
Automation vs. intelligence - "follow me if you want to live"
 
Technical Testing Webinar
Technical Testing WebinarTechnical Testing Webinar
Technical Testing Webinar
 

Similar to Your Automated Execution Does Not Have to be Flaky

Exploratory Testing in an Agile Context
Exploratory Testing in an Agile ContextExploratory Testing in an Agile Context
Exploratory Testing in an Agile ContextElisabeth Hendrickson
 
Testing
TestingTesting
Testing
Bas Bossink
 
Influx/Days 2017 San Francisco | Baron Schwartz
Influx/Days 2017 San Francisco | Baron SchwartzInflux/Days 2017 San Francisco | Baron Schwartz
Influx/Days 2017 San Francisco | Baron Schwartz
InfluxData
 
Chaos Engineering, When should you release the monkeys?
Chaos Engineering, When should you release the monkeys?Chaos Engineering, When should you release the monkeys?
Chaos Engineering, When should you release the monkeys?
Thoughtworks
 
Google, quality and you
Google, quality and youGoogle, quality and you
Google, quality and you
nelinger
 
JUG CH September 2021 - Debugging distributed systems
JUG CH September 2021 - Debugging distributed systemsJUG CH September 2021 - Debugging distributed systems
JUG CH September 2021 - Debugging distributed systems
Bert Jan Schrijver
 
Clean code
Clean codeClean code
Clean code
Jean Carlo Machado
 
LISA18 - How to be your Security Team's Best Friend
LISA18 - How to be your Security Team's Best FriendLISA18 - How to be your Security Team's Best Friend
LISA18 - How to be your Security Team's Best Friend
EmilyGladstoneCole
 
Effective unit testing
Effective unit testingEffective unit testing
Effective unit testing
Roberto Casadei
 
Put Some SRE in Your Shipped Software
Put Some SRE in Your Shipped SoftwarePut Some SRE in Your Shipped Software
Put Some SRE in Your Shipped Software
Theo Schlossnagle
 
ChaoSlingr: Introducing Security based Chaos Testing
ChaoSlingr: Introducing Security based Chaos TestingChaoSlingr: Introducing Security based Chaos Testing
ChaoSlingr: Introducing Security based Chaos Testing
Aaron Rinehart
 
Craft 2019 - Security Chaos Engineering - Security Precognition
Craft 2019 - Security Chaos Engineering - Security PrecognitionCraft 2019 - Security Chaos Engineering - Security Precognition
Craft 2019 - Security Chaos Engineering - Security Precognition
Aaron Rinehart
 
Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in Oracle
Steve Karam
 
Design patterns - Common Solutions to Common Problems - Brad Wood
Design patterns -  Common Solutions to Common Problems - Brad WoodDesign patterns -  Common Solutions to Common Problems - Brad Wood
Design patterns - Common Solutions to Common Problems - Brad Wood
Ortus Solutions, Corp
 
Machine Learning Interpretability - Mateusz Dymczyk - H2O AI World London 2018
Machine Learning Interpretability - Mateusz Dymczyk - H2O AI World London 2018Machine Learning Interpretability - Mateusz Dymczyk - H2O AI World London 2018
Machine Learning Interpretability - Mateusz Dymczyk - H2O AI World London 2018
Sri Ambati
 
Notes on Simulation and GHDL
Notes on Simulation and GHDLNotes on Simulation and GHDL
Notes on Simulation and GHDLDIlawar Singh
 
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdf
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdfMaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdf
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdf
Ahmed Mohamed
 
The Rule of Three
The Rule of ThreeThe Rule of Three
The Rule of Three
Kevlin Henney
 
Debugging
DebuggingDebugging
Random testing
Random testingRandom testing
Random testing
Locaweb
 

Similar to Your Automated Execution Does Not Have to be Flaky (20)

Exploratory Testing in an Agile Context
Exploratory Testing in an Agile ContextExploratory Testing in an Agile Context
Exploratory Testing in an Agile Context
 
Testing
TestingTesting
Testing
 
Influx/Days 2017 San Francisco | Baron Schwartz
Influx/Days 2017 San Francisco | Baron SchwartzInflux/Days 2017 San Francisco | Baron Schwartz
Influx/Days 2017 San Francisco | Baron Schwartz
 
Chaos Engineering, When should you release the monkeys?
Chaos Engineering, When should you release the monkeys?Chaos Engineering, When should you release the monkeys?
Chaos Engineering, When should you release the monkeys?
 
Google, quality and you
Google, quality and youGoogle, quality and you
Google, quality and you
 
JUG CH September 2021 - Debugging distributed systems
JUG CH September 2021 - Debugging distributed systemsJUG CH September 2021 - Debugging distributed systems
JUG CH September 2021 - Debugging distributed systems
 
Clean code
Clean codeClean code
Clean code
 
LISA18 - How to be your Security Team's Best Friend
LISA18 - How to be your Security Team's Best FriendLISA18 - How to be your Security Team's Best Friend
LISA18 - How to be your Security Team's Best Friend
 
Effective unit testing
Effective unit testingEffective unit testing
Effective unit testing
 
Put Some SRE in Your Shipped Software
Put Some SRE in Your Shipped SoftwarePut Some SRE in Your Shipped Software
Put Some SRE in Your Shipped Software
 
ChaoSlingr: Introducing Security based Chaos Testing
ChaoSlingr: Introducing Security based Chaos TestingChaoSlingr: Introducing Security based Chaos Testing
ChaoSlingr: Introducing Security based Chaos Testing
 
Craft 2019 - Security Chaos Engineering - Security Precognition
Craft 2019 - Security Chaos Engineering - Security PrecognitionCraft 2019 - Security Chaos Engineering - Security Precognition
Craft 2019 - Security Chaos Engineering - Security Precognition
 
Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in Oracle
 
Design patterns - Common Solutions to Common Problems - Brad Wood
Design patterns -  Common Solutions to Common Problems - Brad WoodDesign patterns -  Common Solutions to Common Problems - Brad Wood
Design patterns - Common Solutions to Common Problems - Brad Wood
 
Machine Learning Interpretability - Mateusz Dymczyk - H2O AI World London 2018
Machine Learning Interpretability - Mateusz Dymczyk - H2O AI World London 2018Machine Learning Interpretability - Mateusz Dymczyk - H2O AI World London 2018
Machine Learning Interpretability - Mateusz Dymczyk - H2O AI World London 2018
 
Notes on Simulation and GHDL
Notes on Simulation and GHDLNotes on Simulation and GHDL
Notes on Simulation and GHDL
 
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdf
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdfMaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdf
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdf
 
The Rule of Three
The Rule of ThreeThe Rule of Three
The Rule of Three
 
Debugging
DebuggingDebugging
Debugging
 
Random testing
Random testingRandom testing
Random testing
 

More from Alan Richardson

Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009
Alan Richardson
 
Automating Tactically vs Strategically SauceCon 2020
Automating Tactically vs Strategically SauceCon 2020Automating Tactically vs Strategically SauceCon 2020
Automating Tactically vs Strategically SauceCon 2020
Alan Richardson
 
Programming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStringsProgramming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStrings
Alan Richardson
 
About Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil TesterAbout Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil Tester
Alan Richardson
 
Automating and Testing a REST API
Automating and Testing a REST APIAutomating and Testing a REST API
Automating and Testing a REST API
Alan Richardson
 
TDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzzTDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzz
Alan Richardson
 
What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.
Alan Richardson
 
What is Agile Testing? A MindMap
What is Agile Testing? A MindMapWhat is Agile Testing? A MindMap
What is Agile Testing? A MindMap
Alan Richardson
 
Evil Tester's Guide to Agile Testing
Evil Tester's Guide to Agile TestingEvil Tester's Guide to Agile Testing
Evil Tester's Guide to Agile Testing
Alan Richardson
 
The Evil Tester Show - Episode 001 Halloween 2017
The Evil Tester Show - Episode 001 Halloween 2017The Evil Tester Show - Episode 001 Halloween 2017
The Evil Tester Show - Episode 001 Halloween 2017
Alan Richardson
 
Simple ways to add and work with a `.jar` file in your local maven setup
Simple ways to add and work with a `.jar` file in your local maven setupSimple ways to add and work with a `.jar` file in your local maven setup
Simple ways to add and work with a `.jar` file in your local maven setup
Alan Richardson
 
Learning in Public - A How to Speak in Public Workshop
Learning in Public - A How to Speak in Public WorkshopLearning in Public - A How to Speak in Public Workshop
Learning in Public - A How to Speak in Public Workshop
Alan Richardson
 
How to Practise to Remove Fear of Public Speaking
How to Practise to Remove Fear of Public SpeakingHow to Practise to Remove Fear of Public Speaking
How to Practise to Remove Fear of Public Speaking
Alan Richardson
 
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...FAQ - why does my code throw a null pointer exception - common reason #1 Rede...
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...
Alan Richardson
 

More from Alan Richardson (14)

Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009
 
Automating Tactically vs Strategically SauceCon 2020
Automating Tactically vs Strategically SauceCon 2020Automating Tactically vs Strategically SauceCon 2020
Automating Tactically vs Strategically SauceCon 2020
 
Programming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStringsProgramming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStrings
 
About Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil TesterAbout Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil Tester
 
Automating and Testing a REST API
Automating and Testing a REST APIAutomating and Testing a REST API
Automating and Testing a REST API
 
TDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzzTDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzz
 
What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.
 
What is Agile Testing? A MindMap
What is Agile Testing? A MindMapWhat is Agile Testing? A MindMap
What is Agile Testing? A MindMap
 
Evil Tester's Guide to Agile Testing
Evil Tester's Guide to Agile TestingEvil Tester's Guide to Agile Testing
Evil Tester's Guide to Agile Testing
 
The Evil Tester Show - Episode 001 Halloween 2017
The Evil Tester Show - Episode 001 Halloween 2017The Evil Tester Show - Episode 001 Halloween 2017
The Evil Tester Show - Episode 001 Halloween 2017
 
Simple ways to add and work with a `.jar` file in your local maven setup
Simple ways to add and work with a `.jar` file in your local maven setupSimple ways to add and work with a `.jar` file in your local maven setup
Simple ways to add and work with a `.jar` file in your local maven setup
 
Learning in Public - A How to Speak in Public Workshop
Learning in Public - A How to Speak in Public WorkshopLearning in Public - A How to Speak in Public Workshop
Learning in Public - A How to Speak in Public Workshop
 
How to Practise to Remove Fear of Public Speaking
How to Practise to Remove Fear of Public SpeakingHow to Practise to Remove Fear of Public Speaking
How to Practise to Remove Fear of Public Speaking
 
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...FAQ - why does my code throw a null pointer exception - common reason #1 Rede...
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...
 

Recently uploaded

Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 

Recently uploaded (20)

Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 

Your Automated Execution Does Not Have to be Flaky

  • 1. Your Automated Execution Does Not Have to be Flaky Eurostar Webinars Feb 2018 Alan Richardson www.eviltester.com/flaky www.compendiumdev.co.uk @eviltester @EvilTester 1
  • 2. Have you experienced flaky test automation? In this webinar, Alan Richardson plans to convince you that you haven't. Instead you have experienced the result of not resolving the causes of Intermittent execution. Alan will explore some common causes and solutions of intermittent behaviour. Why? So you never say the phrase, "flaky tests", ever again. @EvilTester 2
  • 3. Flaky Test Automation is Normal @EvilTester 3
  • 4. Flaky Test Automation is Normal Because we have normalized Flaky Test Automation "Our Tests are Flaky" "Some tests fail Randomly" @EvilTester 4
  • 5. "There is nothing so absurd that it has not been said by some philosopher." Cicero, On Divination, Book II chapter LVIII, section 119 ﴾44 BC﴿ "Truth happens to an idea. It becomes true, is made true by events." William James, Lecture VI, Pragmatism's Conception of Truth, Pragmatism: A New Name for Some Old Ways of Thinking ﴾1907﴿ @EvilTester 5
  • 6. How to Normalize Flaky Test Automation We all know these Test Automation Truths "GUI Automation is Flaky" "We have to live with 'flakiness'" "We shouldn't automate at the GUI" "We can only remove flakiness under the GUI" "Flaky Tests" blames the tests. Not good enough. @EvilTester 6
  • 7. It isn't even the "Tests" We don't automate Tests We automate the execution of steps in a workflow or process We automate the execution of a System We add condition assertions during that execution We don't have flaky Tests ‐ we have automated execution that fails. Sometimes on the steps, sometimes on the assertions. @EvilTester 7
  • 8. 'Flakiness' does not reside at a 'level' I have seen 'flakiness' in Unit Tests in API Tests in Integration Tests in GUI Tests @EvilTester 8
  • 9. It is too easy to say 'flaky' and then blame 'GUI execution' and then blame 'the tool' Living with flakiness is a choice. Choose a different approach. @EvilTester 9
  • 10. I am not the only person saying this. see references at the end and name drops throughout try to cover something different in this talk @EvilTester 10
  • 11. "We designed that flakiness. We are allowing that to happen. We engineered it to be that way. And its our fault that that exists." Richard Bradshaw, "Your Tests aren't Flaky, You Are!" Selenium Conference 2017 https://www.youtube.com/watch?v=XnkWkrbzMh0 @EvilTester 11
  • 12. Take it more seriously. Describe it differently. Intermittent Occurring at irregular intervals; not continuous or steady. https://en.oxforddictionaries.com/definition/intermittent @EvilTester 12
  • 13. Take it more seriously. Describe it differently. Nondeterministic Algorithm "a nondeterministic algorithm is an algorithm that, even for the same input, can exhibit different behaviors on different runs" https://en.wikipedia.org/wiki/Nondeterministic_algorithm @EvilTester 13
  • 14. Flaky is not serious enough. We do not want to use nondeterministic algorithms for continuous assertions that we are relying on @EvilTester 14
  • 15. Your Test Automation is not Flaky Your automated execution fails intermittently @EvilTester 15
  • 16. Don't Blame Tests. Look For Root Causes. watch Alister Scott's GTAC 2015 talk @EvilTester 16
  • 17. I have removed 'flakiness' from Unit Tests from API Tests from Integration Tests from GUI Tests Automated execution does not have to fail intermittently. @EvilTester 17
  • 18. How to remove Intermittent Failure from your Automated Execution 1. Care 2. Investigate 3. Do something about it @EvilTester 18
  • 19. How to remove Intermittent Failure from your Automated Execution 1. Decide Intermittent Failure is unacceptable 2. Investigate the cause of Intermittent Failure 3. Mitigate Remove the cause actually fix it Implement a retry strategy might obscure bugs Accept Intermittent Results might provide hints at solutions @EvilTester 19
  • 20. Take it seriously We write Automate Assertion checking because we care that those assertions are true for each build of the system. Determinism is important. @EvilTester 20
  • 21. High Level Grouping of Common Causes of Intermittency Synchronisation ‐ lack of or poor Parallel Execution ‐ interference Long Running Tests ‐ too long, too risky Automatability ‐ hard to automate system Tools ‐ inappropriate or out of date State Preconditions ‐ not controlled Assertions ‐ wrong or incorrect assumptions Data ‐ not controlled see also Richard Bradshaw and Mark Winteringham "SACRED" Mnemonic. @EvilTester 21
  • 22. Will cover Top 3 for each Grouping @EvilTester 22
  • 23. Top 3 Common Causes ‐ Synchronisation None Time Based Synchronisation Incorrect App State Synchronisation @EvilTester 23
  • 24. Common Solutions ‐ Synchronisation Synchronise on States do not rely on framework Synchronisation Multiple Intermediate States Consider Latency Synchronise in Abstractions not the  @Test methods unless  @Test specific @EvilTester 24
  • 25. Top 3 Common Causes ‐ Parallel Execution Framework not thread safe Tests Interfere Shared Test Environment @EvilTester 25
  • 26. Common Solutions ‐ Parallel Execution Independent environments Independent Data Separate Suites rather than threaded execution Create Threadsafe, reusable code Create reusable library abstractions rather than Frameworks Avoid 'static' singleton objects @EvilTester 26
  • 27. Top 3 Common Causes ‐ Long Running Tests Sequential rather than Model Based not delineating between: preconditions, process, assertion components tests in flow rather than isolation @EvilTester 27
  • 28. Common Solutions ‐ Long Running Tests Understand that more actions == more risk Synchronise prior to each step Consider Model Based Testing Create component test and automated execution playgrounds Minimum assertions @EvilTester 28
  • 29. Top 3 Common Causes ‐ Automatability, Automatizability Not Testability: Application has non‐deterministic behaviour Hard to Synchronise Application fails non‐deterministically in live @EvilTester 29
  • 30. Common Solutions ‐ Automatability, Automatizability Build apps that can be automated Non‐Deterministic apps need step retry strategies rather than test retry strategies @EvilTester 30
  • 31. Top 3 Common Causes ‐ Tools Out of Date Inappropriate Local Tool Infrastructure @EvilTester 31
  • 32. Common Solutions ‐ Tools Use the right tool for the job Keep your tooling environment controlled and up to date Change your approach to take latency into account process on server return results return source, process on execution client @EvilTester 32
  • 33. Top 3 Common Causes ‐ State Preconditions Not Checking State Preconditions at start of test Not controlling state preconditions prior to test Precondition setup using same tool @EvilTester 33
  • 34. Common Solutions ‐ State Preconditions control data precondition state setup ‐ whatever works http, db, api ‐ 'hack it in' avoid dependencies between execution unless a long running test @EvilTester 34
  • 35. Top 3 Common Causes ‐ Assumptions Encoded in Assertions Assert on an Ordered Set Assert on Uncontrolled Data Assertion Tolerences @EvilTester 35
  • 36. Common Solutions ‐ Assumptions Encoded in Assertions Logging so you can interrogate failure afterwards Ability to re‐run tests with same data and setup @EvilTester 36
  • 37. Top 3 Common Causes ‐ Data Missing Data Externally controlled data Uncontrolled Data @EvilTester 37
  • 38. Common Solutions ‐ Data Create data for each test Avoid test dependencies Avoid re‐using data between tests Check data as a precondition Data synchronisation on all precondition data @EvilTester 38
  • 39. Summary Your Test Execution is not 'flaky', it is failing intermittently It is possible to remove intermittent failures, even when automating through a GUI Commons solutions: synchronisation, data control, environmental isolation @EvilTester 39
  • 40. Other talks to watch Alister Scott, GTAC 2015: Your Tests Aren't Flaky https://www.youtube.com/watch?v=hmk1h40shaE Richard Bradshaw, "Your Tests aren't Flaky, You Are!" Selenium Conference 2017 https://www.youtube.com/watch?v=XnkWkrbzMh0 @EvilTester 40
  • 41. Other talks to watch Craig Schwarzwald, SAY GOODBYE TO THE “F” WORD … FLAKY NO MORE! https://www.youtube.com/watch?v=2K2M7s_Ups0 Mark Winteringham ‐ REST APIs and WebDriver: In Perfect Harmony https://www.youtube.com/watch?v=ugAlCZBMOvM Search also for: Flaky Selenium, Flaky Automation, Flaky Test Automation @EvilTester 41
  • 42. End Alan Richardson www.compendiumdev.co.uk Linkedin ‐ @eviltester Twitter ‐ @eviltester Instagram ‐ @eviltester Facebook ‐ @eviltester Youtube ‐ EvilTesterVideos Pinterest ‐ @eviltester Github ‐ @eviltester Slideshare ‐ @eviltester @EvilTester 42
  • 43. BIO Alan is a Software Development and Testing Coach/Consultant who enjoys testing at a technical level using techniques from psychotherapy and computer science. In his spare time Alan is currently programming a Twitter client called ChatterScan, and multi‐user text adventure game. Alan is the author of the books "Dear Evil Tester", "Java For Testers" and "Automating and Testing a REST API". Alan's main website is compendiumdev.co.uk and he blogs at blog.eviltester.com @EvilTester 43