SlideShare a Scribd company logo
Gil Zilberfeld (TestinGil )
@gil_zilberfeld
Hello!
I AM GIL ZILBERFELD
http://www.testingil.com/
@gil_zilberfeld
Download the code from GitHub
@gil_zilberfeld
@gil_zilberfeld
Tal@TestinGil.com
Gil@TestinGil.com
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
Same, same but different
◉ They are not “real” code
◉ Once a test passes, we move to the next one
◉ We don’t go back to tests
◉ We don’t apply the same standards
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
Code
That works
And easy to maintain
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
http://www.osnews.com/story/19266/WTFs_m
@gil_zilberfeld
“Clean code is
simple and direct. It should
be written like prose"
Grady Booch
@gil_zilberfeld
“Clean code
always looks like it was
written by someone who
cares."
Michael Feathers
@gil_zilberfeld
“Any fool
can write code that a computer
can understand. Good
programmers write code that
humans can understand.”
Martin Fowler
@gil_zilberfeld
The boy scout rule
“Always leave the
campground cleaner than
you found it."
“Uncle” Bob Martin
@gil_zilberfeld
@gil_zilberfeld
Clean tests
◉ Show intent
○ How to use the code
○ What is expected when it’s used in a scenario
◉ Focused
○ Do just enough
○ Like SRP!
◉ Do exactly what they say
◉ Abstract implementation details
@gil_zilberfeld
Test smells
◉ God class and methods
◉ Comments
◉ Uncommunicative names
◉ Embedded constants
◉ How does code impact testing and testability?
Test smells - > Refactoring
◉ God class and methods
◉ Comments
◉ Uncommunicative names
◉ Embedded constants
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
@gil_zilberfeld
Tal@TestinGil.com
Gil@TestinGil.com
@gil_zilberfeld
@gil_zilberfeld
Thanks!
ANY QUESTIONS?
You can find me at:
Email: Gil@TestinGil.com
LinkedIn: Profile, Company
XING: Profile, Group:
Twitter: @gil_zilberfeld
Telegram: @TestinGil
http://www.testingil.com

More Related Content

Similar to Dirty tests and How To Clean Them

Zen and the Art of Test Maintenance
Zen and the Art of Test MaintenanceZen and the Art of Test Maintenance
Zen and the Art of Test Maintenance
Gil Zilberfeld
 
Coverage Lies
Coverage LiesCoverage Lies
Coverage Lies
Gil Zilberfeld
 
Beter code for better tests
Beter code for better testsBeter code for better tests
Beter code for better tests
Gil Zilberfeld
 
TDD For The Rest Of Us
TDD For The Rest Of UsTDD For The Rest Of Us
TDD For The Rest Of Us
TEST Huddle
 
TDD for the rest of us
TDD for the rest of usTDD for the rest of us
TDD for the rest of us
Gil Zilberfeld
 
Continuous Learning - The New ALM
Continuous Learning - The New ALMContinuous Learning - The New ALM
Continuous Learning - The New ALM
Gil Zilberfeld
 
TDD patterns
TDD patternsTDD patterns
TDD patterns
Gil Zilberfeld
 
Introduction to Unit Testing
Introduction to Unit TestingIntroduction to Unit Testing
Introduction to Unit Testing
Gil Zilberfeld
 
ROI is Dead!
ROI is Dead!ROI is Dead!
ROI is Dead!
Gil Zilberfeld
 
TDD for the rest of us...
TDD for the rest of us...TDD for the rest of us...
TDD for the rest of us...
Gil Zilberfeld
 
Introduction to TDD
Introduction to TDDIntroduction to TDD
Introduction to TDD
Gil Zilberfeld
 
Why TDD is Important for Everyone
Why TDD is Important for EveryoneWhy TDD is Important for Everyone
Why TDD is Important for Everyone
Gil Zilberfeld
 
Testing economics101
Testing economics101Testing economics101
Testing economics101
Gil Zilberfeld
 
Spring Testing Features
Spring Testing FeaturesSpring Testing Features
Spring Testing Features
Gil Zilberfeld
 
The fastest BDD crash-course ever
The fastest BDD crash-course everThe fastest BDD crash-course ever
The fastest BDD crash-course ever
Gil Zilberfeld
 
Creating A Unit Testing Strategy
Creating A Unit Testing StrategyCreating A Unit Testing Strategy
Creating A Unit Testing Strategy
Gil Zilberfeld
 

Similar to Dirty tests and How To Clean Them (16)

Zen and the Art of Test Maintenance
Zen and the Art of Test MaintenanceZen and the Art of Test Maintenance
Zen and the Art of Test Maintenance
 
Coverage Lies
Coverage LiesCoverage Lies
Coverage Lies
 
Beter code for better tests
Beter code for better testsBeter code for better tests
Beter code for better tests
 
TDD For The Rest Of Us
TDD For The Rest Of UsTDD For The Rest Of Us
TDD For The Rest Of Us
 
TDD for the rest of us
TDD for the rest of usTDD for the rest of us
TDD for the rest of us
 
Continuous Learning - The New ALM
Continuous Learning - The New ALMContinuous Learning - The New ALM
Continuous Learning - The New ALM
 
TDD patterns
TDD patternsTDD patterns
TDD patterns
 
Introduction to Unit Testing
Introduction to Unit TestingIntroduction to Unit Testing
Introduction to Unit Testing
 
ROI is Dead!
ROI is Dead!ROI is Dead!
ROI is Dead!
 
TDD for the rest of us...
TDD for the rest of us...TDD for the rest of us...
TDD for the rest of us...
 
Introduction to TDD
Introduction to TDDIntroduction to TDD
Introduction to TDD
 
Why TDD is Important for Everyone
Why TDD is Important for EveryoneWhy TDD is Important for Everyone
Why TDD is Important for Everyone
 
Testing economics101
Testing economics101Testing economics101
Testing economics101
 
Spring Testing Features
Spring Testing FeaturesSpring Testing Features
Spring Testing Features
 
The fastest BDD crash-course ever
The fastest BDD crash-course everThe fastest BDD crash-course ever
The fastest BDD crash-course ever
 
Creating A Unit Testing Strategy
Creating A Unit Testing StrategyCreating A Unit Testing Strategy
Creating A Unit Testing Strategy
 

More from Gil Zilberfeld

Spock: It's Only Logical
Spock: It's Only LogicalSpock: It's Only Logical
Spock: It's Only Logical
Gil Zilberfeld
 
Better Estimation and Planning
Better Estimation and PlanningBetter Estimation and Planning
Better Estimation and Planning
Gil Zilberfeld
 
Dependency injection and Why It Matters to Testers
Dependency injection and Why It Matters to TestersDependency injection and Why It Matters to Testers
Dependency injection and Why It Matters to Testers
Gil Zilberfeld
 
Better Estimation and Planning
Better Estimation and PlanningBetter Estimation and Planning
Better Estimation and Planning
Gil Zilberfeld
 
The Untold User Story
The Untold User StoryThe Untold User Story
The Untold User Story
Gil Zilberfeld
 
The Whole Story - Mapping, Slicing and Figuring things out
The Whole Story - Mapping, Slicing and Figuring things outThe Whole Story - Mapping, Slicing and Figuring things out
The Whole Story - Mapping, Slicing and Figuring things out
Gil Zilberfeld
 
Fractal test planning
Fractal test planningFractal test planning
Fractal test planning
Gil Zilberfeld
 
Agile Intro to DevOps
Agile Intro to DevOpsAgile Intro to DevOps
Agile Intro to DevOps
Gil Zilberfeld
 
Playing games remotely
Playing games remotelyPlaying games remotely
Playing games remotely
Gil Zilberfeld
 
A Horror Story
A Horror StoryA Horror Story
A Horror Story
Gil Zilberfeld
 
An agile introduction to DevOps
An agile introduction to DevOpsAn agile introduction to DevOps
An agile introduction to DevOps
Gil Zilberfeld
 
Work
WorkWork
Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDD
Gil Zilberfeld
 
Interview with the Vampire
Interview with the VampireInterview with the Vampire
Interview with the Vampire
Gil Zilberfeld
 
Simple
SimpleSimple
What is wrong with agile
What is wrong with agileWhat is wrong with agile
What is wrong with agile
Gil Zilberfeld
 
Planning with #NoEstimates
Planning with #NoEstimatesPlanning with #NoEstimates
Planning with #NoEstimates
Gil Zilberfeld
 

More from Gil Zilberfeld (17)

Spock: It's Only Logical
Spock: It's Only LogicalSpock: It's Only Logical
Spock: It's Only Logical
 
Better Estimation and Planning
Better Estimation and PlanningBetter Estimation and Planning
Better Estimation and Planning
 
Dependency injection and Why It Matters to Testers
Dependency injection and Why It Matters to TestersDependency injection and Why It Matters to Testers
Dependency injection and Why It Matters to Testers
 
Better Estimation and Planning
Better Estimation and PlanningBetter Estimation and Planning
Better Estimation and Planning
 
The Untold User Story
The Untold User StoryThe Untold User Story
The Untold User Story
 
The Whole Story - Mapping, Slicing and Figuring things out
The Whole Story - Mapping, Slicing and Figuring things outThe Whole Story - Mapping, Slicing and Figuring things out
The Whole Story - Mapping, Slicing and Figuring things out
 
Fractal test planning
Fractal test planningFractal test planning
Fractal test planning
 
Agile Intro to DevOps
Agile Intro to DevOpsAgile Intro to DevOps
Agile Intro to DevOps
 
Playing games remotely
Playing games remotelyPlaying games remotely
Playing games remotely
 
A Horror Story
A Horror StoryA Horror Story
A Horror Story
 
An agile introduction to DevOps
An agile introduction to DevOpsAn agile introduction to DevOps
An agile introduction to DevOps
 
Work
WorkWork
Work
 
Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDD
 
Interview with the Vampire
Interview with the VampireInterview with the Vampire
Interview with the Vampire
 
Simple
SimpleSimple
Simple
 
What is wrong with agile
What is wrong with agileWhat is wrong with agile
What is wrong with agile
 
Planning with #NoEstimates
Planning with #NoEstimatesPlanning with #NoEstimates
Planning with #NoEstimates
 

Recently uploaded

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 

Recently uploaded (20)

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 

Dirty tests and How To Clean Them