SlideShare a Scribd company logo
1 of 38
Download to read offline
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Moral of the Story
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
What exactly is a
brittle test?
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
What exactly is a brittle test?
Fragile, flaky, easy to break
Not deterministic result
Run 1
Input
Run 2
Run 3
Run 4
Not due to only the test code
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Raise your hand if
you ever had to deal
with brittle tests!
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
What are the
consequences
of brittle tests?
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
High Maintenance Cost
Keyword
test 1
test 2
test 3
test 4
75% Fail
Rollercoaster result trend
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
High Maintenance Cost
Debug and manual test
Fix broken tests
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Real Example
Test 1...50 Precondition Step Assert
Nightly regression tests (1000+)
Most of the time working
This time many tests failed
RELEASE DROP
What would you do?
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Hidden Fail
Test 1 Precondition Step Assert
Test 50 Precondition Step Assert
Cognitive bias: test fails only because of the precondition
What if a real fail has been hidden?
Test 1 Precondition Step Assert
Test 50 Precondition Step Assert BUG!
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Useless feedback
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Low Trust - Low Morale
Worthless feedback ignored
Maintenance avoided
Tests get even more broken
Automation is not trusted
V
i
c
i
o
u
s
L
o
o
p
Effort with no
results
No result ==
No commitment
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
What makes our
tests brittle?
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
How can we defeat
the Dragon?
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Ice Cream
Testing Pyramid Real world: Ice Cream
Practical Test Pyramid Ham Vocke - Martin Fowlerโ€™s blog
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Ice Cream
Move
Down to the Pyramid
Tests
Part of tests
Setup & Teardown
Diamo una chance alle codebase legacy Nicola Mincuzzi
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Multipurpose / Holistic
Test 1 Setup Register Assert
Registration test:
Login Assert ... Assert
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Multipurpose / Holistic
โ€œThere should never be more than
one reason for a class to changeโ€
Robert C. Martin (Uncle Bob)
โ€œThere should never be more than
one reason for a test to failโ€
Single Responsibility Principle
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Multipurpose / Holistic
Test 1 Registration Check User
Single assert
Single Responsibility
Setup 1 Checkout
Setup 2 Streaming
Test 1 Registration
Test 2 Login
Test one thing
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Poor Design
Sleep
Best effort automation
Quick and Dirty
Longer learning curve
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Poor Design
Invest in automation
Agree on development guidelines
(Pekkaโ€™s how to write good test cases)
How to write good test cases using Robot Framework Pekka Clark
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Poor Design
Reduce technical debt
Pair development
Boy Scout Rule:
โ€œAlways leave the code you are editing better
than you found itโ€ Robert C. Martin (Uncle Bob)
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Good and Bad Technical Debt
โ€œAnything about your code that slows you down over the long term.
Hard-to-read code, duplication, tangled dependencies, etc.โ€
Good And Bad Technical Debt Henrik Kniberg
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Unreliable and slow environment
Undersized
Environment
Front End Developer
Dev - Ops experiment
Business test
Backend Mad Developer
(internal server error hero)
Super complicated auto implosion mega query
Third part never-working services
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Unreliable and slow environment
Dedicated test environment
Pay for limitless resources
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Unreliable and slow environment
Mock third party systems
Strive for performances
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Hard coded data
Limited products
Test product: 3E24B278-D1EC-358C-ADE5-F51703BBB342
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Hard coded Data
Data Preparation
Data Targeting
Teardown Matters
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
No continuous Testing
Test suite needs to be executed
People is lazy forget to run
Not comparable results
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
No continuous Testing
Continuous testing to collect feedback
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Remove/reduce barriers to test execution
No continuous Testing
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Daily Standup
No continuous Testing
Include test feedback
in release process
Discuss reports together
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Happy Ending
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Automate everything
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Quality assistance
Whole team in charge for quality
More TDD and pair programming
Quality Assistance over
Quality Assurance
BDD and TDD Outside in
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Robot Framework BDD
*** Settings ***
Library SeleniumLibrary
Resource settings.resource
*** Test Cases ***
App Game Available
Given The Browser
When Navigate To The App Game
Then Title Should Be Tic Tac Toe
*** Keywords ***
Given The Browser
Open Browser ${EMPTY} ${BROWSER}
When Navigate To The App Game
Go To ${APP_URL}
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Quality Assistance Team
Angelo Caovilla
Roberta Massimino
Fabrizio Premoli
Emanuele Bonanno
Art Director
Matteo Villa
All CHILI ex-colleagues
Special Thanks to
๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
Contacts
Angelo Caovilla
acaovilla
Robot Framework Milano
lucagiove
Luca Giovenzana
@luboxit

More Related Content

Similar to Beware The Brittle Dragon - A Test Automation Epic Tale

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
ย 
TDD and Getting Paid
TDD and Getting PaidTDD and Getting Paid
TDD and Getting PaidRowan Merewood
ย 
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
ย 
The Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can StealThe Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can Stealmozilla.presentations
ย 
An Agilist's Guide to Excelling on a Scrum Team as a Tester
An Agilist's Guide to Excelling on a Scrum Team as a TesterAn Agilist's Guide to Excelling on a Scrum Team as a Tester
An Agilist's Guide to Excelling on a Scrum Team as a TesterAndy Melichar
ย 
Machine Learning Exposed - James Weaver - Codemotion Amsterdam 2017
Machine Learning Exposed - James Weaver - Codemotion Amsterdam 2017Machine Learning Exposed - James Weaver - Codemotion Amsterdam 2017
Machine Learning Exposed - James Weaver - Codemotion Amsterdam 2017Codemotion
ย 
The Missing Piece between Discovery and Execution
The Missing Piece between Discovery and ExecutionThe Missing Piece between Discovery and Execution
The Missing Piece between Discovery and ExecutionSteffen Kastner
ย 
Solving Flaky Automated Tests Using Machine Learning
Solving Flaky Automated Tests Using Machine LearningSolving Flaky Automated Tests Using Machine Learning
Solving Flaky Automated Tests Using Machine LearningJames Farrier
ย 
UX Without the U Is Your X
UX Without the U Is Your XUX Without the U Is Your X
UX Without the U Is Your XBrandon Ward
ย 
Building for resilience (with speaking notes)
Building for resilience (with speaking notes)Building for resilience (with speaking notes)
Building for resilience (with speaking notes)Abe Gong
ย 
Real World Lessons On The Anti-Patterns of Node.JS
Real World Lessons On The Anti-Patterns of Node.JSReal World Lessons On The Anti-Patterns of Node.JS
Real World Lessons On The Anti-Patterns of Node.JSBen Hall
ย 
What to Avoid When Writing Unit Tests - Robert Fornal
What to Avoid When Writing Unit Tests - Robert FornalWhat to Avoid When Writing Unit Tests - Robert Fornal
What to Avoid When Writing Unit Tests - Robert FornalQA or the Highway
ย 
Node.js Anti Patterns
Node.js Anti PatternsNode.js Anti Patterns
Node.js Anti PatternsBen Hall
ย 
Tips on Starting a Compelling Vlog
Tips on Starting a Compelling VlogTips on Starting a Compelling Vlog
Tips on Starting a Compelling VlogFrank La Vigne
ย 
Slaying The Legacy Dragon: Practical Lessons in Replacing Old Software
Slaying The Legacy Dragon: Practical Lessons in Replacing Old SoftwareSlaying The Legacy Dragon: Practical Lessons in Replacing Old Software
Slaying The Legacy Dragon: Practical Lessons in Replacing Old SoftwareTim Berglund
ย 
Performance - a challenging craft
Performance  - a challenging craftPerformance  - a challenging craft
Performance - a challenging craftFabian Lange
ย 
Leading with Tech Safety: An Unexpected Pathway to Excellence
Leading with Tech Safety: An Unexpected Pathway to ExcellenceLeading with Tech Safety: An Unexpected Pathway to Excellence
Leading with Tech Safety: An Unexpected Pathway to ExcellenceJoshua Kerievsky
ย 
Steve Krug Explains It All for You - SxSW 2011
Steve Krug Explains It All for You - SxSW 2011Steve Krug Explains It All for You - SxSW 2011
Steve Krug Explains It All for You - SxSW 2011Steve Krug
ย 
Akka in 100 slides or less
Akka in 100 slides or lessAkka in 100 slides or less
Akka in 100 slides or lessDerek Wyatt
ย 

Similar to Beware The Brittle Dragon - A Test Automation Epic Tale (20)

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
ย 
TDD and Getting Paid
TDD and Getting PaidTDD and Getting Paid
TDD and Getting Paid
ย 
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
ย 
The Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can StealThe Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can Steal
ย 
An Agilist's Guide to Excelling on a Scrum Team as a Tester
An Agilist's Guide to Excelling on a Scrum Team as a TesterAn Agilist's Guide to Excelling on a Scrum Team as a Tester
An Agilist's Guide to Excelling on a Scrum Team as a Tester
ย 
Machine Learning Exposed - James Weaver - Codemotion Amsterdam 2017
Machine Learning Exposed - James Weaver - Codemotion Amsterdam 2017Machine Learning Exposed - James Weaver - Codemotion Amsterdam 2017
Machine Learning Exposed - James Weaver - Codemotion Amsterdam 2017
ย 
The Missing Piece between Discovery and Execution
The Missing Piece between Discovery and ExecutionThe Missing Piece between Discovery and Execution
The Missing Piece between Discovery and Execution
ย 
Solving Flaky Automated Tests Using Machine Learning
Solving Flaky Automated Tests Using Machine LearningSolving Flaky Automated Tests Using Machine Learning
Solving Flaky Automated Tests Using Machine Learning
ย 
UX Without the U Is Your X
UX Without the U Is Your XUX Without the U Is Your X
UX Without the U Is Your X
ย 
Coaching Testing
Coaching Testing Coaching Testing
Coaching Testing
ย 
Building for resilience (with speaking notes)
Building for resilience (with speaking notes)Building for resilience (with speaking notes)
Building for resilience (with speaking notes)
ย 
Real World Lessons On The Anti-Patterns of Node.JS
Real World Lessons On The Anti-Patterns of Node.JSReal World Lessons On The Anti-Patterns of Node.JS
Real World Lessons On The Anti-Patterns of Node.JS
ย 
What to Avoid When Writing Unit Tests - Robert Fornal
What to Avoid When Writing Unit Tests - Robert FornalWhat to Avoid When Writing Unit Tests - Robert Fornal
What to Avoid When Writing Unit Tests - Robert Fornal
ย 
Node.js Anti Patterns
Node.js Anti PatternsNode.js Anti Patterns
Node.js Anti Patterns
ย 
Tips on Starting a Compelling Vlog
Tips on Starting a Compelling VlogTips on Starting a Compelling Vlog
Tips on Starting a Compelling Vlog
ย 
Slaying The Legacy Dragon: Practical Lessons in Replacing Old Software
Slaying The Legacy Dragon: Practical Lessons in Replacing Old SoftwareSlaying The Legacy Dragon: Practical Lessons in Replacing Old Software
Slaying The Legacy Dragon: Practical Lessons in Replacing Old Software
ย 
Performance - a challenging craft
Performance  - a challenging craftPerformance  - a challenging craft
Performance - a challenging craft
ย 
Leading with Tech Safety: An Unexpected Pathway to Excellence
Leading with Tech Safety: An Unexpected Pathway to ExcellenceLeading with Tech Safety: An Unexpected Pathway to Excellence
Leading with Tech Safety: An Unexpected Pathway to Excellence
ย 
Steve Krug Explains It All for You - SxSW 2011
Steve Krug Explains It All for You - SxSW 2011Steve Krug Explains It All for You - SxSW 2011
Steve Krug Explains It All for You - SxSW 2011
ย 
Akka in 100 slides or less
Akka in 100 slides or lessAkka in 100 slides or less
Akka in 100 slides or less
ย 

Recently uploaded

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
ย 
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
ย 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Featuresลukasz Chruล›ciel
ย 
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
ย 
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
ย 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
ย 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
ย 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
ย 
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
ย 
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
ย 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
ย 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
ย 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
ย 
GOING AOT WITH GRAALVM โ€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM โ€“ DEVOXX GREECE.pdfGOING AOT WITH GRAALVM โ€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM โ€“ DEVOXX GREECE.pdfAlina Yurenko
ย 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
ย 
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
ย 
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
ย 
่‹ฑๅ›ฝUNๅญฆไฝ่ฏ,ๅŒ—ๅฎ‰ๆ™ฎ้กฟๅคงๅญฆๆฏ•ไธš่ฏไนฆ1:1ๅˆถไฝœ
่‹ฑๅ›ฝUNๅญฆไฝ่ฏ,ๅŒ—ๅฎ‰ๆ™ฎ้กฟๅคงๅญฆๆฏ•ไธš่ฏไนฆ1:1ๅˆถไฝœ่‹ฑๅ›ฝUNๅญฆไฝ่ฏ,ๅŒ—ๅฎ‰ๆ™ฎ้กฟๅคงๅญฆๆฏ•ไธš่ฏไนฆ1:1ๅˆถไฝœ
่‹ฑๅ›ฝUNๅญฆไฝ่ฏ,ๅŒ—ๅฎ‰ๆ™ฎ้กฟๅคงๅญฆๆฏ•ไธš่ฏไนฆ1:1ๅˆถไฝœqr0udbr0
ย 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
ย 

Recently uploaded (20)

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
ย 
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
ย 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
ย 
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
ย 
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
ย 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
ย 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
ย 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
ย 
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
ย 
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
ย 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
ย 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
ย 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
ย 
GOING AOT WITH GRAALVM โ€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM โ€“ DEVOXX GREECE.pdfGOING AOT WITH GRAALVM โ€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM โ€“ DEVOXX GREECE.pdf
ย 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
ย 
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
ย 
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
ย 
่‹ฑๅ›ฝUNๅญฆไฝ่ฏ,ๅŒ—ๅฎ‰ๆ™ฎ้กฟๅคงๅญฆๆฏ•ไธš่ฏไนฆ1:1ๅˆถไฝœ
่‹ฑๅ›ฝUNๅญฆไฝ่ฏ,ๅŒ—ๅฎ‰ๆ™ฎ้กฟๅคงๅญฆๆฏ•ไธš่ฏไนฆ1:1ๅˆถไฝœ่‹ฑๅ›ฝUNๅญฆไฝ่ฏ,ๅŒ—ๅฎ‰ๆ™ฎ้กฟๅคงๅญฆๆฏ•ไธš่ฏไนฆ1:1ๅˆถไฝœ
่‹ฑๅ›ฝUNๅญฆไฝ่ฏ,ๅŒ—ๅฎ‰ๆ™ฎ้กฟๅคงๅญฆๆฏ•ไธš่ฏไนฆ1:1ๅˆถไฝœ
ย 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
ย 

Beware The Brittle Dragon - A Test Automation Epic Tale

  • 1. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla
  • 2. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Moral of the Story
  • 3. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla What exactly is a brittle test?
  • 4. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla What exactly is a brittle test? Fragile, flaky, easy to break Not deterministic result Run 1 Input Run 2 Run 3 Run 4 Not due to only the test code
  • 5. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Raise your hand if you ever had to deal with brittle tests!
  • 6. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla What are the consequences of brittle tests?
  • 7. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla High Maintenance Cost Keyword test 1 test 2 test 3 test 4 75% Fail Rollercoaster result trend
  • 8. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla High Maintenance Cost Debug and manual test Fix broken tests
  • 9. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Real Example Test 1...50 Precondition Step Assert Nightly regression tests (1000+) Most of the time working This time many tests failed RELEASE DROP What would you do?
  • 10. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Hidden Fail Test 1 Precondition Step Assert Test 50 Precondition Step Assert Cognitive bias: test fails only because of the precondition What if a real fail has been hidden? Test 1 Precondition Step Assert Test 50 Precondition Step Assert BUG!
  • 11. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Useless feedback
  • 12. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Low Trust - Low Morale Worthless feedback ignored Maintenance avoided Tests get even more broken Automation is not trusted V i c i o u s L o o p Effort with no results No result == No commitment
  • 13. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla What makes our tests brittle?
  • 14. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla How can we defeat the Dragon?
  • 15. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Ice Cream Testing Pyramid Real world: Ice Cream Practical Test Pyramid Ham Vocke - Martin Fowlerโ€™s blog
  • 16. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Ice Cream Move Down to the Pyramid Tests Part of tests Setup & Teardown Diamo una chance alle codebase legacy Nicola Mincuzzi
  • 17. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Multipurpose / Holistic Test 1 Setup Register Assert Registration test: Login Assert ... Assert
  • 18. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Multipurpose / Holistic โ€œThere should never be more than one reason for a class to changeโ€ Robert C. Martin (Uncle Bob) โ€œThere should never be more than one reason for a test to failโ€ Single Responsibility Principle
  • 19. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Multipurpose / Holistic Test 1 Registration Check User Single assert Single Responsibility Setup 1 Checkout Setup 2 Streaming Test 1 Registration Test 2 Login Test one thing
  • 20. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Poor Design Sleep Best effort automation Quick and Dirty Longer learning curve
  • 21. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Poor Design Invest in automation Agree on development guidelines (Pekkaโ€™s how to write good test cases) How to write good test cases using Robot Framework Pekka Clark
  • 22. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Poor Design Reduce technical debt Pair development Boy Scout Rule: โ€œAlways leave the code you are editing better than you found itโ€ Robert C. Martin (Uncle Bob)
  • 23. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Good and Bad Technical Debt โ€œAnything about your code that slows you down over the long term. Hard-to-read code, duplication, tangled dependencies, etc.โ€ Good And Bad Technical Debt Henrik Kniberg
  • 24. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Unreliable and slow environment Undersized Environment Front End Developer Dev - Ops experiment Business test Backend Mad Developer (internal server error hero) Super complicated auto implosion mega query Third part never-working services
  • 25. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Unreliable and slow environment Dedicated test environment Pay for limitless resources
  • 26. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Unreliable and slow environment Mock third party systems Strive for performances
  • 27. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Hard coded data Limited products Test product: 3E24B278-D1EC-358C-ADE5-F51703BBB342
  • 28. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Hard coded Data Data Preparation Data Targeting Teardown Matters
  • 29. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla No continuous Testing Test suite needs to be executed People is lazy forget to run Not comparable results
  • 30. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla No continuous Testing Continuous testing to collect feedback
  • 31. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Remove/reduce barriers to test execution No continuous Testing
  • 32. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Daily Standup No continuous Testing Include test feedback in release process Discuss reports together
  • 33. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Happy Ending
  • 34. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Automate everything
  • 35. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Quality assistance Whole team in charge for quality More TDD and pair programming Quality Assistance over Quality Assurance BDD and TDD Outside in
  • 36. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Robot Framework BDD *** Settings *** Library SeleniumLibrary Resource settings.resource *** Test Cases *** App Game Available Given The Browser When Navigate To The App Game Then Title Should Be Tic Tac Toe *** Keywords *** Given The Browser Open Browser ${EMPTY} ${BROWSER} When Navigate To The App Game Go To ${APP_URL}
  • 37. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Quality Assistance Team Angelo Caovilla Roberta Massimino Fabrizio Premoli Emanuele Bonanno Art Director Matteo Villa All CHILI ex-colleagues Special Thanks to
  • 38. ๐Ÿ‰ Beware the Brittle Dragon - Luca Giovenzana & Angelo Caovilla Contacts Angelo Caovilla acaovilla Robot Framework Milano lucagiove Luca Giovenzana @luboxit