SlideShare a Scribd company logo
Testing Antipatterns Matt Robinson Puppet Labs
Anti - What?
Antipattern ( Dark Pattern ): A pattern that is commonly used but is ineffective and/or counterproductive
 
Who has an extensive test suite?
Who feels like they should test more?
Who dislikes, even dreads, writing tests?
Testing Can Be Fun Text Text Text Text http://xkcd.com/583/
For example:
Red   Green  TDD Addiction
Testing Framework Games (although these can be a distraction) (although these can be a distraction)
Not looking like an idiot - that’s fun right?
Why Automated Testing? Prevents regressions Improves confidence Documents requirements Catches errors before codes ships You fill in the blank _________
Overheard Reasons Not to Test Don’t trust the tests Who tests the tests? Quis custodiet ipsos custodes? Makes refactoring harder Not enough return on investment (ROI) Too hard and/or time consuming
Antipatterns that have bitten me the most
Not Running Tests Often Enough
If it’s Hard and Important Do it More Often
testing, deploying, releasing, exercising, meditating, writing, public speaking
How Often? Before deployment or release After every commit: CI (Continuous Integration) - Jenkins, Cruise Control, BuildBot, Cerebrus, CI Joe Before every commit (or push): discipline, git hooks Every save: autotest, watchr
Not Fixing Broken Tests Before Committing New Code
The Slowpoke
How Slow Is Too Slow?
Unit Test Suite Took 8 Hours to Run - On One Project
Single Test Took 2 Minutes to Start
So slow that rewriting it in PHP would make it faster
How to Get Faster Make your implementation code faster Run your tests in parallel Optimize your tests (new framework, trick garbage collector, rewrite culprits) Mark some tests as slow and only run them occasionally
The Mockery
Why mock when the real things will do?
Testing at the Wrong Level
unit, smoke, functional, integration, acceptance
Success Against All Odds (test never fails) (test never fails)
 
Testing Implementation Instead of Behavior
Testing Implementation
Testing Behavior
Order Dependent Failures
You’ve got too much global state
Excessive Setup
What are we testing again?
The Dodger - Never tests desired behavior The Stranger - Misplaced tests Local Hero - Worked on my dev box Generous Leftovers - Fills your hard drive The Giant - You may have a God object The Loudmouth - Spams your test logs Other Antipatterns
Summary
Avoid Antipatterns and Testing Can Be Fun
Links http://blog.james-carr.org/2006/11/03/tdd-anti-patterns/ http://jasonrudolph.com/blog/testing-anti-patterns-how-to-fail-with-100-test-coverage/ http://blog.rubybestpractices.com/posts/gregory/034-issue-5-testing-antipatterns.html http://c2.com/cgi/wiki?AntiPatternsCatalog http://martinfowler.com/articles/mocksArentStubs.html

More Related Content

PPTX
Intro to TDD
PPT
TDD - Christchurch APN May 2012
PDF
Level Up Your Automated Tests
PPTX
Is Groovy better for testing than Java?
PPTX
TDD - Unit testing done right and programmer happiness
PDF
Why Your Selenium Tests are so Dang Brittle, and What to Do About It
PPTX
The problem with tdd
PPTX
Hindsight lessons about API testing
Intro to TDD
TDD - Christchurch APN May 2012
Level Up Your Automated Tests
Is Groovy better for testing than Java?
TDD - Unit testing done right and programmer happiness
Why Your Selenium Tests are so Dang Brittle, and What to Do About It
The problem with tdd
Hindsight lessons about API testing

What's hot (20)

PPTX
Maybe We Don’t Have to Test It
PPTX
Collaborative testingultimateoverview
PPTX
Level Up Your Automated Tests
PDF
ATAGTR Keynote: I have a rock in my shoe - Navigating Improvement
PDF
PHP unit testing - good and bad practices
PPT
Reliable tests with selenium web driver
PPTX
TestWorksConf: Experience exploratory testing
PDF
Worst practices in software testing by the Testing troll
PDF
Hands off Exploratory Testing - Managing Testing at Scale
PPTX
Break to build - the mindset of the modern day tester
PDF
Test automation – the bitter truth
PDF
AppiumLite Keynote: Many Hats to Make a Tester
PPTX
"Worst" practices of software testing
PPTX
Automation vs. intelligence - "follow me if you want to live"
PDF
SLASSCOM: Breaking illusions with Testing
PDF
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
PDF
Code Review Matters and Manners
PDF
STARWest: Make Your Team Awesome, Yes You Can!
PDF
Selenium Conference India: Intersection of Automation and Exploratory Testing
PDF
Selenium Users Anonymous
Maybe We Don’t Have to Test It
Collaborative testingultimateoverview
Level Up Your Automated Tests
ATAGTR Keynote: I have a rock in my shoe - Navigating Improvement
PHP unit testing - good and bad practices
Reliable tests with selenium web driver
TestWorksConf: Experience exploratory testing
Worst practices in software testing by the Testing troll
Hands off Exploratory Testing - Managing Testing at Scale
Break to build - the mindset of the modern day tester
Test automation – the bitter truth
AppiumLite Keynote: Many Hats to Make a Tester
"Worst" practices of software testing
Automation vs. intelligence - "follow me if you want to live"
SLASSCOM: Breaking illusions with Testing
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
Code Review Matters and Manners
STARWest: Make Your Team Awesome, Yes You Can!
Selenium Conference India: Intersection of Automation and Exploratory Testing
Selenium Users Anonymous
Ad

Viewers also liked (7)

PDF
Fighting Fear-Driven-Development With PHPUnit
PDF
Make Everyone a Tester: Natural Language Acceptance Testing
PPTX
Coursera, Understanding the Brain
PPT
Code smells in PHP
PDF
No Longer Slaves to Fear- 12 Powerful Truths to Help You Defeat Fear in 2016
PDF
Parallel testing overview
PPT
Reliable acceptance testing
Fighting Fear-Driven-Development With PHPUnit
Make Everyone a Tester: Natural Language Acceptance Testing
Coursera, Understanding the Brain
Code smells in PHP
No Longer Slaves to Fear- 12 Powerful Truths to Help You Defeat Fear in 2016
Parallel testing overview
Reliable acceptance testing
Ad

Similar to Open source bridge testing antipatterns presentation (20)

PPTX
What You are Doing Wrong with Automated Testing
PDF
DSR Testing (Part 1)
PDF
Tests antipatterns
PDF
TDD Workshop UTN 2012
PPTX
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
PDF
Completely Test-Driven
KEY
Testing smells
PPTX
2016 10-04: tdd++: tdd made easier
PPTX
An Introduction to Developer Testing
PDF
Unit testing - An introduction
KEY
Driving application development through behavior driven development
PDF
The Art of Test Patterns
PPTX
Unit Testing and TDD 2017
PPT
Test-Driven Development
PPTX
Test Driven Development
PPTX
Making the Unstable Stable - An Intro To Testing
PPT
Automated testing overview
PDF
TDD Anti-patterns (2022 edition)
PPTX
Patterns for Scripted Acceptance Test-Driven Development
What You are Doing Wrong with Automated Testing
DSR Testing (Part 1)
Tests antipatterns
TDD Workshop UTN 2012
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
Completely Test-Driven
Testing smells
2016 10-04: tdd++: tdd made easier
An Introduction to Developer Testing
Unit testing - An introduction
Driving application development through behavior driven development
The Art of Test Patterns
Unit Testing and TDD 2017
Test-Driven Development
Test Driven Development
Making the Unstable Stable - An Intro To Testing
Automated testing overview
TDD Anti-patterns (2022 edition)
Patterns for Scripted Acceptance Test-Driven Development

Recently uploaded (20)

PPTX
Machine Learning_overview_presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
A Presentation on Artificial Intelligence
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
Teaching material agriculture food technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Cloud computing and distributed systems.
PDF
Machine learning based COVID-19 study performance prediction
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
Machine Learning_overview_presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Unlocking AI with Model Context Protocol (MCP)
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Programs and apps: productivity, graphics, security and other tools
A Presentation on Artificial Intelligence
Per capita expenditure prediction using model stacking based on satellite ima...
Teaching material agriculture food technology
Building Integrated photovoltaic BIPV_UPV.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectroscopy.pptx food analysis technology
Cloud computing and distributed systems.
Machine learning based COVID-19 study performance prediction
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Digital-Transformation-Roadmap-for-Companies.pptx
The AUB Centre for AI in Media Proposal.docx

Open source bridge testing antipatterns presentation

Editor's Notes

  • #2: Ask questions whenever you want
  • #4: Talk about Design Patterns general reusable solution to a commonly occurring problem
  • #9: Realized while writing this talk that I was focusing on what pissed me off and made me not want to talk about it. Should be humor in testing.
  • #11: Red failing Green passing
  • #17: Not really an antipattern since it’s really only solving being lazy
  • #20: CI essentially glorified cron job
  • #21: The Joel Test #5: Fix bugs before writing new code Mention Lava Lamps
  • #28: Martin Fowler Mocks aren't Stubs. Never met a mockist whose tests I liked. Not mocking means mini integration tests. Possibly controversial. When to mock: code you don't control - file system, web server, external libraries like ssl
  • #30: Too much mocking might indicate this
  • #31: Everyone has their own terms
  • #32: Test Driven Development prevents this
  • #34: Behaviour Driven Development is a larger term with more meaning
  • #37: These are annoying but can’t be ignored. How to find these failures - binary search.
  • #38: Testing antipatterns can indicate antipatterns in your implementation code
  • #40: Data driven web apps tend to be even worse