The
Death of Flaky Tests
By Dave Haeffer,
@TourDeDave
http://bit.ly/saucecon18-1
~1.5% of runs report a flaky result
~16% of tests have some level of flakiness
Re-runs cited as a common mitigation strategy
http://bit.ly/saucecon18-2
“a re-run culture is toxic”
“Flaky” tests that caught a bug that was missed
Your application is flaky
http://bit.ly/saucecon18-3
“take flake back” - #hooray4flake
Tracked stats for individual test runs using standard deviation
At a glance way to spot tests which require attention
http://testarmada.io/
http://bit.ly/saucecon18-4
You can avoid flaky tests with good test design practices.
http://bit.ly/saucecon18-5
Flakiness is something we design into our tests.
Flakiness is an opportunity to improve, don’t ignore it.
Acronym and questions.
http://bit.ly/saucecon18-6
If you do not treat test automation well,
why are you expecting miracles?
http://bit.ly/saucecon18-7
http://bit.ly/saucecon18-8
http://bit.ly/saucecon18-7
http://bit.ly/saucecon18-9
http://bit.ly/saucecon18-8
http://bit.ly/saucecon18-7
http://bit.ly/saucecon18-10
http://bit.ly/saucecon18-9
http://bit.ly/saucecon18-8
http://bit.ly/saucecon18-7
100
0 100
Code Score (%)
RunResult(Pass%)
Individual Test Matrix
Reliable
External Issues
Likely To Fail
Broken
http://bit.ly/saucecon18-11
Available tooling doesn’t cater to people with existing
Selenium code.
Best practices are all around us, but we’re not all using them.
Let’s codify these practices into automated feedback loops to
make the path to successful automated testing simpler for
everyone.
Image sources:
https://thenounproject.com/icon/1532282/
https://thenounproject.com/icon/947849/
Created by dDara
from the Noun Project
Created by Adrien Coquet
from the Noun Project
Test Code In Flight Test Code At Rest
NOTE: You Need Test Run Data Too
Created by dDara
from the Noun Project
Created by Adrien Coquet
from the Noun Project
Abstract Event Listener
Tapping The Wire Protocol
Log Parsing
Static Code Analysis
100
0 100
Code Score (%)
RunResult(Pass%)
Individual Test Matrix
Reliable
External Issues
Likely To Fail
Broken
Abstract Event Listener
Abstract Event Listener
Abstract Event Listener
Abstract Event Listener
Abstract Event Listener
C# - http://bit.ly/saucecon2018-12
Java - http://bit.ly/saucecon2018-13
Python- http://bit.ly/saucecon2018-14
Ruby - http://bit.ly/saucecon2018-15
JS - http://bit.ly/saucecon2018-16
Static code analysis
a.k.a. “linting”
“A linter or lint refers to tools that analyze source
code to flag programming errors, bugs, stylistic
errors, and suspicious constructs. The term is
originated from a Unix utility that examined C
language source code.”
https://en.wikipedia.org/wiki/Lint_(software)
Static code analysis
a.k.a. “linting”
“A linter or lint refers to tools that analyze source
code to flag programming errors, bugs, stylistic
errors, and suspicious constructs. The term is
originated from a Unix utility that examined C
language source code.”
https://en.wikipedia.org/wiki/Lint_(software)
Outro
●
Zoom if (just a little bit)
●
Remove “faayy from our vocabulary
●
Let’s truly treat test code liae app code by
oferif equivaleft toolif
http://davehaeffner.com/contact/

The Death of Flaky Tests by Dave Haeffner