SlideShare une entreprise Scribd logo
1  sur  138
aninda kundu
spacefugitive       @aninda42
2008

sidu ponnappa
kaiwren        @ponnappa
2006
any_instance
any_instance

that’s right - it’s an antipattern
wrest
wrest

'http://google.com'.to_uri(:follow_redirects => false).get
started two companies
started two companies

    over five years

{ context }
pair programming
stand-ups
TDD
{ facts }
O SHIT!
feedback!
changing code is tough

              +
feedback loops should be short
{ tests! }
no, not those
yeah, those
choices!
watir?
            TDD?
                               functional?
  cucumber?
                                    rspec?
BDD?
                                     minitest?
  shoulda?

       integration?            regression?
                      unit?
full-to confusion for beginners
still a little confusing for the experienced
a good place to start?
a good place to start?

      unit tests
this talk is about unit testing

cukes, capybara, selenium et. al. are out of scope
we also thought...
lets analyse the situation by looking at the villains
after all, a good villain is a sexy thang!
after all, a good villain is a sexy thang!

   makes you want to be the hero
like this guy
so this talk is about unit testing anti-patterns
{ two types }
two types

just for this talk, yeah? not formal, like.
implementation / workflow
implementation / workflow

what’s in the test / how it was written
{ implementation anti-patterns }
The long test



The test with too many assertions
The long test file
The long test file
The long test file



Refactor: extract multiple classes
The test that has logic
who watches the watchmen?
The implementation bound test
the test with arcane terminology
the test with arcane terminology
name/descriptor should say it all
the test with arcane terminology
  name/descriptor should say it all
treat these as developer documentation
the test with arcane terminology
    name/descriptor should say it all
treat these as developer documentation
people rolling onto a project <3 you for it
the test with arcane terminology
    name/descriptor should say it all
treat these as developer documentation
people rolling onto a project <3 you for it
      comment = well named test
The slow test
the slow test

too much data ? (again, fixtures or heavy setup)
The slow test

too much data ? (again, fixtures or heavy setup)
                   up next..
The slow test

too much data ? (again, fixtures or heavy setup)
                   up next..

   Too many objects (running into MRI GC?)
The slow test

Too much data ? (again, fixtures or heavy setup)
                   up next..

   Too many objects (running into MRI GC?)
                 profile and fix
The slow test

Too much data ? (again, fixtures or heavy setup)
                   up next..

   Too many objects (running into MRI GC?)
                 profile and fix

              Testing externals?
The slow test

Too much data ? (again, fixtures or heavy setup)
                   up next..

   Too many objects (running into MRI GC?)
                 profile and fix

              Testing externals?
               Stop it! Stub it!
The slow test

Too much data ? (again, fixtures or heavy setup)
                   up next..

   Too many objects (running into MRI GC?)
                 profile and fix

              Testing externals?
               Stop it! Stub it!

          Rails startup time !@#$?
The slow test

Too much data ? (again, fixtures or heavy setup)
                   up next..

   Too many objects (running into MRI GC?)
                 profile and fix

              Testing externals?
               Stop it! Stub it!

          Rails startup time !@#$?
                Spork, Guard
The test that has complex setup
The test that has complex setup

Fixtures are for static data only
The test that has complex setup

           Fixtures are for static data only

Large factory setups are better than invisible fixtures
The test that has complex setup

           Fixtures are for static data only

Large factory setups are better than invisible fixtures

             Stub non essential factories
All tests should execute independantly as well as a suite
All tests should execute independantly as well as a suite




              tests must not share state
Avoid redundant / replicated tests
Avoid redundant / replicated tests



  Push tests down the order as much as possible

 e.g. Controller tests that can exist as model tests

Rule of thumb : Do this as long as you can keep the
          name of the test almost the same
The test that shows high churn
The test that cannot fail



Red-green refactor. Make sure the test fails first.
{ workflow anti-patterns }
TEST LAST
#1
refactor
#1.1
b692246bad
refactor


b692246bad
refactor


b692246bad         0df4e19f2a
TESTING ONLY FOR
   REGRESSION
usually test last
TDD helps encapsulate
TESTING ELSWHERE
separate teams of testers writing unit tests
ONLY RUN RAKE
means you’re never working on just one unit
NEVER RUN RAKE
without CI you’re in a world of pain
ONLY RUN TEST(S) FROM CLI
slower, less productive
QA TEAM FOR BUSINESS LOGIC
       VERIFICATION
your tests should be enough
NO CI
test frequently (every commit!)
feedback for distributed/large teams
CI servers are collaboration tools
MANUAL DEPLOY TO STAGING
don’t trust your commits
{ reading
between the
    lines }
text
subtext
we do BDD, not TDD
we do BDD, not TDD

 we only write Cukes
we have 100% code coverage
we have 100% code coverage

that’s from all those Cukes we just told you about
we love our tests

we run them at least once every day
we keep our build green
we keep our build green

we comment out failing tests if that’s what it takes
tests are an integral part of the
         way we work
tests are an integral part of the
              way we work
we write them for every client that wants them
Attributions
•Agile Pills: http://briannoyle.wordpress.com/2009/05/12/getting-yer-agile-on-at-a-discount-upcoming-course
•TDD index card: http://www.testically.org/2011/01/12/the-ideal-use-case-to-give-tdd-a-try/
•Pair programming: http://thoughtworker.com/agile-our-way-life
•Stand-up: http://www.flickr.com/photos/karthikc/333796551/
•C# : http://www.jameswiseman.com/blog/tag/c-sharp/
•Robotic arm : http://profmason.com/?p=562
•Wrecking ball: http://marilebetterdays.wordpress.com/2012/02/28/wrecking-ball-lyrics-the-title-track/
•Cat eat finger: http://www.123rf.com/photo_2005824_cat-eating-human-finger.html
•Tiger attack: http://tvmywifewatches.blogspot.com/2011/07/rhw-of-nj-pointcounterpoint-should-kim.html
•Lex Luthor: http://maxnaylor.ca/?attachment_id=835
•The Joker: http://www.fanpop.com/spots/the-joker/images/9028188/title/joker
42

@ponnappa        @aninda42




                        

Contenu connexe

Tendances

C++ unit-1-part-15
C++ unit-1-part-15C++ unit-1-part-15
C++ unit-1-part-15Jadavsejal
 
Refactoring legacy code driven by tests - ENG
Refactoring legacy code driven by tests - ENGRefactoring legacy code driven by tests - ENG
Refactoring legacy code driven by tests - ENGLuca Minudel
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven DevelopmentDhaval Dalal
 
Working Effectively with Legacy Code: Lessons in Practice
Working Effectively with Legacy Code: Lessons in PracticeWorking Effectively with Legacy Code: Lessons in Practice
Working Effectively with Legacy Code: Lessons in PracticeAmar Shah
 
Unit Testing Fundamentals
Unit Testing FundamentalsUnit Testing Fundamentals
Unit Testing FundamentalsRichard Paul
 
Quality comes free with open source testing tools
Quality comes free with open source testing toolsQuality comes free with open source testing tools
Quality comes free with open source testing toolsSteven Mak
 
Pitfalls Of Tdd Adoption by Bartosz Bankowski
Pitfalls Of Tdd Adoption by Bartosz BankowskiPitfalls Of Tdd Adoption by Bartosz Bankowski
Pitfalls Of Tdd Adoption by Bartosz BankowskiAgileee
 
Continuous Security Testing
Continuous Security TestingContinuous Security Testing
Continuous Security TestingSteven Mak
 
Working with Legacy Code
Working with Legacy CodeWorking with Legacy Code
Working with Legacy CodeEyal Golan
 
Unit Test + Functional Programming = Love
Unit Test + Functional Programming = LoveUnit Test + Functional Programming = Love
Unit Test + Functional Programming = LoveAlvaro Videla
 
Google mock for dummies
Google mock for dummiesGoogle mock for dummies
Google mock for dummiesHarry Potter
 
Maintaining Your Tests At Scale
Maintaining Your Tests At ScaleMaintaining Your Tests At Scale
Maintaining Your Tests At ScaleTrent Willis
 
Lessons learned in agile romania
Lessons learned in agile romaniaLessons learned in agile romania
Lessons learned in agile romaniaOpenAgile Romania
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven DevelopmentTung Nguyen Thanh
 
TDD - Test Driven Dvelopment | Test First Design
TDD -  Test Driven Dvelopment | Test First DesignTDD -  Test Driven Dvelopment | Test First Design
TDD - Test Driven Dvelopment | Test First DesignQuang Nguyễn Bá
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven DevelopmentPablo Villar
 
Roy Osherove TDD From Scratch
Roy Osherove TDD From ScratchRoy Osherove TDD From Scratch
Roy Osherove TDD From ScratchRoy Osherove
 

Tendances (18)

C++ unit-1-part-15
C++ unit-1-part-15C++ unit-1-part-15
C++ unit-1-part-15
 
Refactoring legacy code driven by tests - ENG
Refactoring legacy code driven by tests - ENGRefactoring legacy code driven by tests - ENG
Refactoring legacy code driven by tests - ENG
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Working Effectively with Legacy Code: Lessons in Practice
Working Effectively with Legacy Code: Lessons in PracticeWorking Effectively with Legacy Code: Lessons in Practice
Working Effectively with Legacy Code: Lessons in Practice
 
Unit Testing Fundamentals
Unit Testing FundamentalsUnit Testing Fundamentals
Unit Testing Fundamentals
 
Quality comes free with open source testing tools
Quality comes free with open source testing toolsQuality comes free with open source testing tools
Quality comes free with open source testing tools
 
Pitfalls Of Tdd Adoption by Bartosz Bankowski
Pitfalls Of Tdd Adoption by Bartosz BankowskiPitfalls Of Tdd Adoption by Bartosz Bankowski
Pitfalls Of Tdd Adoption by Bartosz Bankowski
 
Continuous Security Testing
Continuous Security TestingContinuous Security Testing
Continuous Security Testing
 
TDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and JasmineTDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and Jasmine
 
Working with Legacy Code
Working with Legacy CodeWorking with Legacy Code
Working with Legacy Code
 
Unit Test + Functional Programming = Love
Unit Test + Functional Programming = LoveUnit Test + Functional Programming = Love
Unit Test + Functional Programming = Love
 
Google mock for dummies
Google mock for dummiesGoogle mock for dummies
Google mock for dummies
 
Maintaining Your Tests At Scale
Maintaining Your Tests At ScaleMaintaining Your Tests At Scale
Maintaining Your Tests At Scale
 
Lessons learned in agile romania
Lessons learned in agile romaniaLessons learned in agile romania
Lessons learned in agile romania
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 
TDD - Test Driven Dvelopment | Test First Design
TDD -  Test Driven Dvelopment | Test First DesignTDD -  Test Driven Dvelopment | Test First Design
TDD - Test Driven Dvelopment | Test First Design
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
 
Roy Osherove TDD From Scratch
Roy Osherove TDD From ScratchRoy Osherove TDD From Scratch
Roy Osherove TDD From Scratch
 

En vedette

五則新聞整理
五則新聞整理五則新聞整理
五則新聞整理junia
 
Brian Oliver Pimp My Data Grid
Brian Oliver  Pimp My Data GridBrian Oliver  Pimp My Data Grid
Brian Oliver Pimp My Data Griddeimos
 
Online Marketing, Part II: Turning Participants into Supporters-Stepping up Y...
Online Marketing, Part II: Turning Participants into Supporters-Stepping up Y...Online Marketing, Part II: Turning Participants into Supporters-Stepping up Y...
Online Marketing, Part II: Turning Participants into Supporters-Stepping up Y...Kivi Leroux Miller
 
Small Business and Social Media presentation at Rockville Womens Business Center
Small Business and Social Media presentation at Rockville Womens Business CenterSmall Business and Social Media presentation at Rockville Womens Business Center
Small Business and Social Media presentation at Rockville Womens Business CenterShashi Bellamkonda
 
Etxebizitza 1 T
Etxebizitza 1 TEtxebizitza 1 T
Etxebizitza 1 Tikasleak1t
 
How to Communicate Like Their Favorite Nonprofit - LTA Rally, New Orleans
How to Communicate Like Their Favorite Nonprofit - LTA Rally, New OrleansHow to Communicate Like Their Favorite Nonprofit - LTA Rally, New Orleans
How to Communicate Like Their Favorite Nonprofit - LTA Rally, New OrleansKivi Leroux Miller
 
Creating Friend Lists on Facebook
Creating Friend Lists on FacebookCreating Friend Lists on Facebook
Creating Friend Lists on Facebookmdpr
 
Webcasting In The Efl Class 1
Webcasting In The Efl Class 1Webcasting In The Efl Class 1
Webcasting In The Efl Class 1cristiarnau
 
中国的互联网
中国的互联网中国的互联网
中国的互联网Liu Xing
 
Farms in Montgomery County Maryland
Farms in Montgomery County MarylandFarms in Montgomery County Maryland
Farms in Montgomery County MarylandShashi Bellamkonda
 
Infofinal Presentation_re
Infofinal Presentation_reInfofinal Presentation_re
Infofinal Presentation_reBockit
 
Exposure to Android Development
Exposure to Android DevelopmentExposure to Android Development
Exposure to Android DevelopmentDelph
 
A Content Creation Strategy for a Busy Nonprofit - Ignite 10NTC
A Content Creation Strategy for a Busy Nonprofit - Ignite 10NTCA Content Creation Strategy for a Busy Nonprofit - Ignite 10NTC
A Content Creation Strategy for a Busy Nonprofit - Ignite 10NTCKivi Leroux Miller
 
Digital Marketing Trends (and Nonprofit Comm Trends in General) for BloomCon
Digital Marketing Trends (and Nonprofit Comm Trends in General) for BloomConDigital Marketing Trends (and Nonprofit Comm Trends in General) for BloomCon
Digital Marketing Trends (and Nonprofit Comm Trends in General) for BloomConKivi Leroux Miller
 

En vedette (20)

Column Rob Van Steen
Column Rob Van SteenColumn Rob Van Steen
Column Rob Van Steen
 
Funcion Finanzas
Funcion FinanzasFuncion Finanzas
Funcion Finanzas
 
五則新聞整理
五則新聞整理五則新聞整理
五則新聞整理
 
Brian Oliver Pimp My Data Grid
Brian Oliver  Pimp My Data GridBrian Oliver  Pimp My Data Grid
Brian Oliver Pimp My Data Grid
 
Online Marketing, Part II: Turning Participants into Supporters-Stepping up Y...
Online Marketing, Part II: Turning Participants into Supporters-Stepping up Y...Online Marketing, Part II: Turning Participants into Supporters-Stepping up Y...
Online Marketing, Part II: Turning Participants into Supporters-Stepping up Y...
 
Small Business and Social Media presentation at Rockville Womens Business Center
Small Business and Social Media presentation at Rockville Womens Business CenterSmall Business and Social Media presentation at Rockville Womens Business Center
Small Business and Social Media presentation at Rockville Womens Business Center
 
Etxebizitza 1 T
Etxebizitza 1 TEtxebizitza 1 T
Etxebizitza 1 T
 
How to Communicate Like Their Favorite Nonprofit - LTA Rally, New Orleans
How to Communicate Like Their Favorite Nonprofit - LTA Rally, New OrleansHow to Communicate Like Their Favorite Nonprofit - LTA Rally, New Orleans
How to Communicate Like Their Favorite Nonprofit - LTA Rally, New Orleans
 
Demotivate
DemotivateDemotivate
Demotivate
 
Creating Friend Lists on Facebook
Creating Friend Lists on FacebookCreating Friend Lists on Facebook
Creating Friend Lists on Facebook
 
database diklat
database diklatdatabase diklat
database diklat
 
I D A
I D AI D A
I D A
 
big bang
big bangbig bang
big bang
 
Webcasting In The Efl Class 1
Webcasting In The Efl Class 1Webcasting In The Efl Class 1
Webcasting In The Efl Class 1
 
中国的互联网
中国的互联网中国的互联网
中国的互联网
 
Farms in Montgomery County Maryland
Farms in Montgomery County MarylandFarms in Montgomery County Maryland
Farms in Montgomery County Maryland
 
Infofinal Presentation_re
Infofinal Presentation_reInfofinal Presentation_re
Infofinal Presentation_re
 
Exposure to Android Development
Exposure to Android DevelopmentExposure to Android Development
Exposure to Android Development
 
A Content Creation Strategy for a Busy Nonprofit - Ignite 10NTC
A Content Creation Strategy for a Busy Nonprofit - Ignite 10NTCA Content Creation Strategy for a Busy Nonprofit - Ignite 10NTC
A Content Creation Strategy for a Busy Nonprofit - Ignite 10NTC
 
Digital Marketing Trends (and Nonprofit Comm Trends in General) for BloomCon
Digital Marketing Trends (and Nonprofit Comm Trends in General) for BloomConDigital Marketing Trends (and Nonprofit Comm Trends in General) for BloomCon
Digital Marketing Trends (and Nonprofit Comm Trends in General) for BloomCon
 

Similaire à Testing smells

2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easierChristian Hujer
 
TDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionTDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionDionatan default
 
Completely Test-Driven
Completely Test-DrivenCompletely Test-Driven
Completely Test-DrivenIan Truslove
 
An Introduction to unit testing
An Introduction to unit testingAn Introduction to unit testing
An Introduction to unit testingSteven Casey
 
Open source bridge testing antipatterns presentation
Open source bridge testing antipatterns presentationOpen source bridge testing antipatterns presentation
Open source bridge testing antipatterns presentationmmrobins
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)Steve Upton
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development CodeOps Technologies LLP
 
Bigger Unit Test Are Better
Bigger Unit Test Are BetterBigger Unit Test Are Better
Bigger Unit Test Are BetterPeter Schuler
 
Unit testing
Unit testingUnit testing
Unit testingPiXeL16
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Danny Preussler
 
Beyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver SoftwareBeyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver SoftwareChris Weldon
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroPaul Boos
 
Practical unit testing 2014
Practical unit testing 2014Practical unit testing 2014
Practical unit testing 2014Andrew Fray
 
Shift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David LaulusaShift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David LaulusaQA or the Highway
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flexmichael.labriola
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017Xavi Hidalgo
 

Similaire à Testing smells (20)

TDD and Getting Paid
TDD and Getting PaidTDD and Getting Paid
TDD and Getting Paid
 
2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier
 
TDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionTDD Flow: The Mantra in Action
TDD Flow: The Mantra in Action
 
Completely Test-Driven
Completely Test-DrivenCompletely Test-Driven
Completely Test-Driven
 
An Introduction to unit testing
An Introduction to unit testingAn Introduction to unit testing
An Introduction to unit testing
 
Open source bridge testing antipatterns presentation
Open source bridge testing antipatterns presentationOpen source bridge testing antipatterns presentation
Open source bridge testing antipatterns presentation
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 
Bigger Unit Test Are Better
Bigger Unit Test Are BetterBigger Unit Test Are Better
Bigger Unit Test Are Better
 
Unit testing
Unit testingUnit testing
Unit testing
 
TDD Best Practices
TDD Best PracticesTDD Best Practices
TDD Best Practices
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 
Testacular
TestacularTestacular
Testacular
 
Test Driven
Test DrivenTest Driven
Test Driven
 
Beyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver SoftwareBeyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver Software
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
 
Practical unit testing 2014
Practical unit testing 2014Practical unit testing 2014
Practical unit testing 2014
 
Shift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David LaulusaShift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David Laulusa
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017
 

Dernier

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 

Dernier (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 

Testing smells

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. blah blah contributed to rspec blah blah\n
  10. \n
  11. contributed an anti pattern to rspec\n
  12. \n
  13. \n
  14. \n
  15. \n
  16. Ask them what&amp;#x2019;s the difference.\n
  17. Ask them what&amp;#x2019;s the difference.\n
  18. Ask them what&amp;#x2019;s the difference.\n
  19. \n
  20. Ask them what&amp;#x2019;s the difference.\n
  21. Lets start with a few well understood facts about our community which help set some context - we&amp;#x2019;ll circle back to them later\n
  22. we&amp;#x2019;re all agilists. I haven&amp;#x2019;t come across a single waterfall Ruby shop - or not one that claims this publicly. Agile is all about short feedback loops allowing you to deliver high quality software while dealing with change.\n
  23. Pairing is much less common - but accepted.\n
  24. Pairing is much less common - but accepted.\n
  25. Everyone writes tests now. Nobody will publicly state that they explicitly consider testing and/or TDD a low value activity or worse, a complete waste of time.\n
  26. Lets start with a few well understood facts about building software\n
  27. new codebases are awsome. so beautiful...\n
  28. then it&amp;#x2019;s jenga\n
  29. and anyone working on it winds up like the good prince\n
  30. And because these things are true, we try to solve the problem with tests\n
  31. Short feedback cycles are important. It&amp;#x2019;s like a friendly kitty giving you feedback about code that needs petting.\n
  32. Lengthen your feedback cycles and what you learn when the feedback hits you will be like having a royal bengal tiger jump on you while you&amp;#x2019;re in a pool. Seriously.\n
  33. And because these things are true, we try to solve the problem with tests\n
  34. And because these things are true, we try to solve the problem with tests\n
  35. And because these things are true, we try to solve the problem with tests\n
  36. And because these things are true, we try to solve the problem with tests\n
  37. And because these things are true, we try to solve the problem with tests\n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. A Test should have only one reason to fail and therefore ideally make just one assertion.\n
  57. \n
  58. \n
  59. \n
  60. \n
  61. Tests are supposed to be simple, easy to read and understand.\nAre you going to write a test that tests your test? Then avoid logic in tests.\n\n
  62. \n
  63. \n
  64. \n\n
  65. \n\n
  66. \n\n
  67. If your code does not have behaviour, dont test it. Its totally fine to skip it\n
  68. \n\n
  69. \n\n
  70. \n\n
  71. \n\n
  72. \n\n
  73. Testing is used for quick feedback to the developer. \n\nSlow test suites are run less often. \n\nSkipping test run can cause a dev to spend more time in retracing their steps to figure out what broke the tests since they had them passing last.\n\nIts worth finding out which your slowest tests are and optimizing them.\n\n
  74. \n\n
  75. \n\n
  76. \n\n
  77. \n\n
  78. \n\n
  79. \n\n
  80. \n\n
  81. \n\n
  82. Testing is used for quick feedback to the developer. \n\nSlow test suites are run less often. \n\nSkipping test run can cause a dev to spend more time in retracing their steps to figure out what broke the tests since they had them passing last.\n\nIts worth finding out which your slowest tests are and optimizing them.\n\n
  83. Testing is used for quick feedback to the developer. \n\nSlow test suites are run less often. \n\nSkipping test run can cause a dev to spend more time in retracing their steps to figure out what broke the tests since they had them passing last.\n\nIts worth finding out which your slowest tests are and optimizing them.\n\n
  84. Testing is used for quick feedback to the developer. \n\nSlow test suites are run less often. \n\nSkipping test run can cause a dev to spend more time in retracing their steps to figure out what broke the tests since they had them passing last.\n\nIts worth finding out which your slowest tests are and optimizing them.\n\n
  85. Testing is used for quick feedback to the developer. \n\nSlow test suites are run less often. \n\nSkipping test run can cause a dev to spend more time in retracing their steps to figure out what broke the tests since they had them passing last.\n\nIts worth finding out which your slowest tests are and optimizing them.\n\n
  86. \n
  87. \n
  88. Testing is used for quick feedback to the developer. \n\nSlow test suites are run less often. \n\nSkipping test run can cause a dev to spend more time in retracing their steps to figure out what broke the tests since they had them passing last.\n\nIts worth finding out which your slowest tests are and optimizing them.\n\n
  89. Testing is used for quick feedback to the developer. \n\nSlow test suites are run less often. \n\nSkipping test run can cause a dev to spend more time in retracing their steps to figure out what broke the tests since they had them passing last.\n\nIts worth finding out which your slowest tests are and optimizing them.\n\n
  90. Testing is used for quick feedback to the developer. \n\nSlow test suites are run less often. \n\nSkipping test run can cause a dev to spend more time in retracing their steps to figure out what broke the tests since they had them passing last.\n\nIts worth finding out which your slowest tests are and optimizing them.\n\n
  91. Testing is used for quick feedback to the developer. \n\nSlow test suites are run less often. \n\nSkipping test run can cause a dev to spend more time in retracing their steps to figure out what broke the tests since they had them passing last.\n\nIts worth finding out which your slowest tests are and optimizing them.\n\n
  92. Testing is used for quick feedback to the developer. \n\nSlow test suites are run less often. \n\nSkipping test run can cause a dev to spend more time in retracing their steps to figure out what broke the tests since they had them passing last.\n\nIts worth finding out which your slowest tests are and optimizing them.\n\n
  93. Testing is used for quick feedback to the developer. \n\nSlow test suites are run less often. \n\nSkipping test run can cause a dev to spend more time in retracing their steps to figure out what broke the tests since they had them passing last.\n\nIts worth finding out which your slowest tests are and optimizing them.\n\n
  94. \n
  95. \n
  96. This is rule number 1\n
  97. raaad\n
  98. gureeen\n
  99. reefactor\n
  100. better yet\n
  101. \n
  102. \n
  103. \n
  104. \n
  105. red-green-commit-refactor-commit\n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n
  125. So - back to what you hear about testing. Here are some of the common things bandied about in the industry, with some subtext about what it usually means.\n
  126. then there&amp;#x2019;s the subtext - which I&amp;#x2019;ll mention where appropriate\n
  127. \n
  128. Ask them what&amp;#x2019;s the difference.\n
  129. Ask them what&amp;#x2019;s the difference.\n
  130. Ask them what&amp;#x2019;s the difference.\n
  131. Ask them what&amp;#x2019;s the difference.\n
  132. Ask them what&amp;#x2019;s the difference.\n
  133. \n
  134. \n
  135. \n
  136. \n
  137. \n
  138. \n