SlideShare a Scribd company logo
1 of 36
Download to read offline
EFFECTIVE AND PRAGMATIC TEST DRIVEN DEVELOPMENT
ANDREW RENDELL, PRINCIPAL CONSULTANT
INTRODUCTION


 IS TDD REALLY UBIQUITOUS?

 EVALUATION OF THE APPLICATION OF TDD ON A REAL WORLD
 PROJECT

 IMPEDIMENTS AND THEIR RESOLUTION

 TANGIBLE BENEFITS
PROJECT CONTEXT
 T-MOBILE

 MOBILE INTERNET PORTAL

 WEBNWALK3

 PERSONALISED EXPERIENCE



 GO LIVE DATE INVARIANT
DEVELOPMENT DYNAMIC

 STRONG CUSTOMER FOCUS
   COMMITMENT TO ERROR FREE USER EXPERIENCE
   CARRIER GRADE SOFTWARE QUALITY

 PRESSURE TO DELIVER
   MARKETING DRIVEN
   HIGHLY COMPETITIVE

 CONFLICTING DRIVERS
   RISK ADVERSE          CONSERVATIVE
   HIGHLY COMPETITIVE          RAPID ADAPTABILITY
“VALTECH BELIEVES
THAT AGILE, AND IN
PARTICULAR TEST
DRIVEN DEVELOPMENT
CAN HELP THESE
COMPANIES DELIVER
QUICKLY AND SAFELY.”
MAKING A PROJECT TEST DRIVEN
MAKING A PROJECT TEST DRIVEN

 WHERE WE STARTED

 HOW THE INTENT WAS COMMUNICATED

 STRUCTURING THE APPLICATION TO STRUCTURE
 DEVELOPMENT ACTIVITIES

 HUMAN INTERACTION WITH DEVELOPERS
MAKING A PROJECT TEST DRIVEN




                               DEVELOPERS EXPERIENCE

                               ONE OR TWO WITH
                               TDD EXPERIENCE //
                               MOST HAD GOOD
                               UNDERSTANDING OF
                               TDD THEORY //
                               ALMOST ALL HAD
                               USED JUNIT //
                               MOST HIGH CALIBRE
                               JAVA DEVELOPERS
MAKING A PROJECT TEST DRIVEN




                               MANAGEMENT EXPERIENCE

                               EXPERTS IN MOBILE
                               TELCO // GOOD
                               UNDERSTANDING OF
                               AGILE THEORY //
                               READY TO EMBRACE
                               NEW PRACTICES //
                               LONG HISTORY OF
                               WATERFALL,
                               DOCUMENT CENTRIC
MAKING A PROJECT TEST DRIVEN




                               AT INCEPTION

                               NO INTENT TO USE
                               TDD
                               END OF INCEPTION

                               SOME JUNIT TESTS //
                               DECIDE TO USE TDD
                               // MEASURE
                               EXISTING COVERAGE
                               // AUDIT EXISTING
                               USE OF TESTS
COMMUNICATING THE INTENT


 MOST IMPORTANT

 INTERACTIVE SESSIONS

 TEAM WAS INEXPERIENED

 ACCEPTED INEVITABILITY OF MAKING MISTAKES
TDD THROUGH APPLICATION STRUCTURE

 WEBNWALK IS A STANDARD MVC APPLICATION

 INDENTIFIED INTEGRATION PAIN POINT
  PRESENTATION LAYER / SERVER SIDE
  DIFFERENT TEAMS, SKILLS, COMPLEXITY, TIMESCALES


 RIGOROUS DEFINITION OF INTERFACE THROUGH CONTRACT

 CONTRACT BECOMES STARTING POINT OF DEVELOPMENT
EmailWidgetService     XXXEmailContract
                     +customerNotAuthenticatedWithPartner() : EmailWidgetModel
                     +oneReadOneUnreadEmail() : EmailWidgetModel
                     +noUneadEmailFiveReadEmail() : EmailWidgetModel
                     +noEmai() : EmailWidgetModel
                     +manyEmails() : EmailWidgetModel
                     +errorGettingEmails() : EmailWidgetModel




                     XXXEmailAcceptanceTest                              JUnit4 Test




                     XXXEmailWidgetService
TOP DOWN DEVELOPMENT
                               Tests
         EmailAcceptanceTest           EmailWidgetService




                               Tests
  EmailWidgetServiceImplTest           EmailWidgetServiceImpl

                                              Uses


                                       CustomerDAO




                               Tests
       CustomerDAOImplTest             CustomerDAOImpl
RESPECT // EMPOWERMENT // AVOID DOGMA // IN RETROSPECT, TOO
MUCH FLEXIBILITY ALLOWED, ESPECIALLY FOR LESS EXPERIENCED
DEVELOPERS




RESPECTING THE
DEVELOPERS FREEDOM
IMPEDIMENTS AND PITFALLS
DISILLUSINMENT // DOGMATIC APPROACH
DISILLUSIONMENT

 PATTERN SEEN ON SEVERAL PROJECTS

 COMMON AMONGST NEW PRACTITIONERS

 EVERYONE WENT THROUGH SOME OF THE STAGES
DISILLUSIONMENT

 TOO FOCUSED ON TDD AS AN OBJECTIVE RATHER THAN AS A
 VEHICLE

 VELOCITY BEING MEASURED FOR FIRST TIME

 HIGHLIGHTS SLIPPAGE

 TDD BLAMED
DOGMATIC APPLICATION

 ALL NEWCOMERS TO TDD AFFECTED,
 NOT JUST THOSE LESS EXPERIENCED IN TOOLSET

 TOO FOCUSED ON THE APPLICATION OF THE TECHNIQUE

 FAILURE TO PERCEIVE THE DIFFERENT IN VALUE OF DIFFERENT
 TESTS
DOGMATIC APPLICATION

 BEST DEVELOPERS FOCUSED ON WHY TESTS WERE BEING
 WRITTEN

 WROTE AND REWROTE CLASSES TO EXPEDITE TESTING

 VIEWED INCORRECTLY AS „FAILURE‟ BY NEW DEVELOPERS
TRIVIAL EXAMPLE
     AverageDurationAnalyserImpl.java
     /**
      * Obtains the current time.
      * protected so can be overridden in unit test
      */
     protected long getCurrentTime() {
     return System.currentTimeMillis();
     }

     AverageDurationAnalyserImplTest.java
     private static long RIGHT_NOW = 1000;

     @Before
     public void onSetup() {
     analyser = new AverageDurationAnalyserImpl(){
     @Override
      protected long getCurrentTime() {return RIGHT_NOW ;}};
     }
MEASURABLE BENEFITS
MEASURABLE BENEFITS

IMPROVED CODE
STRUCTURE //
LESS REDUNDANT
EFFORT//
VIRTUOUS CIRCLE
IMPROVED COHESION

 STRONG COHESION IS ONE OF THE MOST IMPORTANT
 ATTRIBUTES OF WELL STRUCTURED CODE

 TDD NATURALLY ENCOURAGES COHESION

 TOP DOWN APPROACH MEANS RESPONSIBILITY IS WELL
 UNDERSTOOD BEFORE CODE IS BEGUN

 WRITING A TEST WHICH HAS MORE THAN ONE SET OF GOALS
 IS AN OBVIOUS BAD SMELL AND INDICATES TIME TO
 DELEGATE
LOW COHESION
Logic for implementation of transformation                                           Http Client
implemented piecemeal for several classes




AuctionWidgetModel
           Tests                    WidgetService               Worker               HmlService


          Tests                                                       Tests

AuctionWidgetModelTest
           Tests                                 WorkerTest   Tests
+testSelling()                                   +testCombineWatchingAndBuyingTotals()


                                                                                          Tests

             Logic for testing data transformation                            HmlServiceTest
                                                                                          Tests
             implemented in several different classes                         +testWatchingData()
HIGH COHESION

                       All data transformation logic encapsulated in
                       Xml Adaptor. All tests and test data in XmlAdaptorTest.



WidgetService                Worker                    HttpClient




      AuctionWidgetModel                             XmlAdaptor
                 Tests




                                                   XmlAdaptorTest
A COMMON PROBLEM // TDD ENCOURAGES FOCUS ON WHAT IS
REQUIRED // DISCOURAGES SPECULATION SEEMS PARTICULARLY TRUE
FOR COMMON INFRASTRUCTURE COMPONENTS



YAGNI:
YOU AIN‟T GOING TO
NEED IT
VIRTUOUS CIRCLE OF AGILITY
VIRTUOUS CIRCLE OF AGILITY

 STAKEHOLDERS WERE INCLUDED IN TDD

 INCREASED CONFIDENCE IN CORRECTNESS

 COMPARED FAVOURABLY WITH PREVIOUS EXPERIENCE
EXAMPLE

 IDENTIFICATION MODULE

 HIGH COMPLEXITY AND RISK

 ALL PARTIES INVOLVED IN ANALYSIS

 TESTS VERIFY IMPLEMENTATION

 HUMAN TESTER SIGNS OFF IMPLEMENTATION

 SUBSEQUENT CHANGES NOT BLOCKED BY MANAGEMENT

 CONFIDENCE HIGH
CONCLUSIONS

 TEST DRIVEN DEVELOPMENT IS WIDELY KNOWN

 PRACTICAL EXPERIENCE IS RARER

 INTRODUCTION CAN BE DIFFICULT

 THE TECHNIQUE BRINGS REWARDS

 REAL DIFFERENCE TO DELIVERY OF THE WEBNWALK PLATFORM
Andrew.Rendell@valtech.co.uk
http://twitter.com/anderew

http://www.valtech.co.uk
http://blog.valtech.co.uk
http://twitter.com/valtech

More Related Content

What's hot

TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)nedirtv
 
Design for Testability
Design for Testability Design for Testability
Design for Testability Pawel Kalbrun
 
Wind River Test Management
Wind River Test ManagementWind River Test Management
Wind River Test Managementramzyh78
 
TDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionTDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionDionatan default
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefAhmed Shreef
 
Rock Your Code with Code Contracts
Rock Your Code with Code ContractsRock Your Code with Code Contracts
Rock Your Code with Code ContractsDavid McCarter
 
Advanced Verification Methodology for Complex System on Chip Verification
Advanced Verification Methodology for Complex System on Chip VerificationAdvanced Verification Methodology for Complex System on Chip Verification
Advanced Verification Methodology for Complex System on Chip VerificationVLSICS Design
 
ISE 7.1i Software
ISE 7.1i SoftwareISE 7.1i Software
ISE 7.1i SoftwareA B Shinde
 
Reproducible Crashes: Fuzzing Pharo by Mutating the Test Methods
Reproducible Crashes: Fuzzing Pharo by Mutating the Test MethodsReproducible Crashes: Fuzzing Pharo by Mutating the Test Methods
Reproducible Crashes: Fuzzing Pharo by Mutating the Test MethodsUniversity of Antwerp
 
Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)David McCarter
 
Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4JAMK
 
Beyond Testing: Specs and Behavior Driven Development
Beyond Testing: Specs and Behavior  Driven DevelopmentBeyond Testing: Specs and Behavior  Driven Development
Beyond Testing: Specs and Behavior Driven DevelopmentRabble .
 
ISSRE 2008 Trip Report
ISSRE 2008 Trip ReportISSRE 2008 Trip Report
ISSRE 2008 Trip ReportBob Binder
 
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012Pietro Di Bello
 

What's hot (18)

50120140502011
5012014050201150120140502011
50120140502011
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
 
Design for Testability
Design for Testability Design for Testability
Design for Testability
 
Wind River Test Management
Wind River Test ManagementWind River Test Management
Wind River Test Management
 
TDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionTDD Flow: The Mantra in Action
TDD Flow: The Mantra in Action
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed Shreef
 
Design For Reliability
Design For ReliabilityDesign For Reliability
Design For Reliability
 
Rock Your Code with Code Contracts
Rock Your Code with Code ContractsRock Your Code with Code Contracts
Rock Your Code with Code Contracts
 
Advanced Verification Methodology for Complex System on Chip Verification
Advanced Verification Methodology for Complex System on Chip VerificationAdvanced Verification Methodology for Complex System on Chip Verification
Advanced Verification Methodology for Complex System on Chip Verification
 
ISE 7.1i Software
ISE 7.1i SoftwareISE 7.1i Software
ISE 7.1i Software
 
Reproducible Crashes: Fuzzing Pharo by Mutating the Test Methods
Reproducible Crashes: Fuzzing Pharo by Mutating the Test MethodsReproducible Crashes: Fuzzing Pharo by Mutating the Test Methods
Reproducible Crashes: Fuzzing Pharo by Mutating the Test Methods
 
Code coverage
Code coverageCode coverage
Code coverage
 
Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)
 
Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4
 
Beyond Testing: Specs and Behavior Driven Development
Beyond Testing: Specs and Behavior  Driven DevelopmentBeyond Testing: Specs and Behavior  Driven Development
Beyond Testing: Specs and Behavior Driven Development
 
ISSRE 2008 Trip Report
ISSRE 2008 Trip ReportISSRE 2008 Trip Report
ISSRE 2008 Trip Report
 
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012
 

Viewers also liked

Test driven developement
Test driven developementTest driven developement
Test driven developementBhavik Panchal
 
Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014jaredrrichardson
 
TDD: Test Driven Development 첫번째 이야기
TDD: Test Driven Development 첫번째 이야기TDD: Test Driven Development 첫번째 이야기
TDD: Test Driven Development 첫번째 이야기Ji Heon Kim
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationJohn Ferguson Smart Limited
 
BDD presentation
BDD presentationBDD presentation
BDD presentationtemebele
 
Behavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile TestingBehavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile Testingdversaci
 
ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentNaresh Jain
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentLiz Keogh
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For AgileNaresh Jain
 

Viewers also liked (11)

Test driven developement
Test driven developementTest driven developement
Test driven developement
 
Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014
 
TDD: Test Driven Development 첫번째 이야기
TDD: Test Driven Development 첫번째 이야기TDD: Test Driven Development 첫번째 이야기
TDD: Test Driven Development 첫번째 이야기
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world application
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
Behavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile TestingBehavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile Testing
 
ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven Development
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
BDD in Action - building software that matters
BDD in Action - building software that mattersBDD in Action - building software that matters
BDD in Action - building software that matters
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 

Similar to Effective and pragmatic test driven development by Andrew Rendell, Principal Consultant at Valtech

Test Driven Development Andrew Rendell Valtech
Test Driven Development   Andrew Rendell   ValtechTest Driven Development   Andrew Rendell   Valtech
Test Driven Development Andrew Rendell ValtechValtech UK
 
SOASTA CloudTest Lite
SOASTA CloudTest LiteSOASTA CloudTest Lite
SOASTA CloudTest LiteFred Beringer
 
Microservices Testing Strategies: The Good, the Bad, and the Reality
Microservices Testing Strategies: The Good, the Bad, and the RealityMicroservices Testing Strategies: The Good, the Bad, and the Reality
Microservices Testing Strategies: The Good, the Bad, and the RealityTechWell
 
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012Tieturi Oy
 
Testing micro services using testkits
Testing micro services using testkitsTesting micro services using testkits
Testing micro services using testkitsMaxim Novak
 
What are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | EdurekaWhat are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | EdurekaEdureka!
 
Testing in the cloud
Testing in the cloudTesting in the cloud
Testing in the cloudMCARaghu
 
Agile Open 2009 Tdd And Architecture Influences
Agile Open 2009   Tdd And Architecture InfluencesAgile Open 2009   Tdd And Architecture Influences
Agile Open 2009 Tdd And Architecture InfluencesGustavo Andres Brey
 
Evaluating Test Driven Development And Parameterized Unit Testing In Dot Net ...
Evaluating Test Driven Development And Parameterized Unit Testing In Dot Net ...Evaluating Test Driven Development And Parameterized Unit Testing In Dot Net ...
Evaluating Test Driven Development And Parameterized Unit Testing In Dot Net ...mdfachowdhury
 
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012TEST Huddle
 
Cloud Native Dünyada CI/CD
Cloud Native Dünyada CI/CDCloud Native Dünyada CI/CD
Cloud Native Dünyada CI/CDMustafa AKIN
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0Ganesh Kondal
 
San Jose Selenium Meet-up PushToTest TestMaker Presentation
San Jose Selenium Meet-up PushToTest TestMaker PresentationSan Jose Selenium Meet-up PushToTest TestMaker Presentation
San Jose Selenium Meet-up PushToTest TestMaker PresentationClever Moe
 
'BIG Testing' with Hans Buwalda
'BIG Testing' with Hans Buwalda 'BIG Testing' with Hans Buwalda
'BIG Testing' with Hans Buwalda TEST Huddle
 

Similar to Effective and pragmatic test driven development by Andrew Rendell, Principal Consultant at Valtech (20)

Test Driven Development Andrew Rendell Valtech
Test Driven Development   Andrew Rendell   ValtechTest Driven Development   Andrew Rendell   Valtech
Test Driven Development Andrew Rendell Valtech
 
SOASTA CloudTest Lite
SOASTA CloudTest LiteSOASTA CloudTest Lite
SOASTA CloudTest Lite
 
Microservices Testing Strategies: The Good, the Bad, and the Reality
Microservices Testing Strategies: The Good, the Bad, and the RealityMicroservices Testing Strategies: The Good, the Bad, and the Reality
Microservices Testing Strategies: The Good, the Bad, and the Reality
 
Testing in a distributed world
Testing in a distributed worldTesting in a distributed world
Testing in a distributed world
 
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
 
Marc perillo
Marc perilloMarc perillo
Marc perillo
 
Testing micro services using testkits
Testing micro services using testkitsTesting micro services using testkits
Testing micro services using testkits
 
50120140502011
5012014050201150120140502011
50120140502011
 
What are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | EdurekaWhat are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | Edureka
 
system verilog
system verilogsystem verilog
system verilog
 
Testing in the cloud
Testing in the cloudTesting in the cloud
Testing in the cloud
 
Agile Open 2009 Tdd And Architecture Influences
Agile Open 2009   Tdd And Architecture InfluencesAgile Open 2009   Tdd And Architecture Influences
Agile Open 2009 Tdd And Architecture Influences
 
Evaluating Test Driven Development And Parameterized Unit Testing In Dot Net ...
Evaluating Test Driven Development And Parameterized Unit Testing In Dot Net ...Evaluating Test Driven Development And Parameterized Unit Testing In Dot Net ...
Evaluating Test Driven Development And Parameterized Unit Testing In Dot Net ...
 
Unit testing
Unit testingUnit testing
Unit testing
 
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
 
CLOUD TESTING MODEL – BENEFITS, LIMITATIONS AND CHALLENGES
CLOUD TESTING MODEL – BENEFITS, LIMITATIONS AND CHALLENGESCLOUD TESTING MODEL – BENEFITS, LIMITATIONS AND CHALLENGES
CLOUD TESTING MODEL – BENEFITS, LIMITATIONS AND CHALLENGES
 
Cloud Native Dünyada CI/CD
Cloud Native Dünyada CI/CDCloud Native Dünyada CI/CD
Cloud Native Dünyada CI/CD
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0
 
San Jose Selenium Meet-up PushToTest TestMaker Presentation
San Jose Selenium Meet-up PushToTest TestMaker PresentationSan Jose Selenium Meet-up PushToTest TestMaker Presentation
San Jose Selenium Meet-up PushToTest TestMaker Presentation
 
'BIG Testing' with Hans Buwalda
'BIG Testing' with Hans Buwalda 'BIG Testing' with Hans Buwalda
'BIG Testing' with Hans Buwalda
 

More from Valtech UK

Get to know your users using Lean UX
Get to know your users using Lean UXGet to know your users using Lean UX
Get to know your users using Lean UXValtech UK
 
The Art of Visualising Software - Simon Brown
The Art of Visualising Software - Simon BrownThe Art of Visualising Software - Simon Brown
The Art of Visualising Software - Simon BrownValtech UK
 
Get to know your users
Get to know your users Get to know your users
Get to know your users Valtech UK
 
LeanUX and Agile in the Public Sector
LeanUX and Agile in the Public SectorLeanUX and Agile in the Public Sector
LeanUX and Agile in the Public SectorValtech UK
 
Transforming nhs choices using agile and lean ux agile manc
Transforming nhs choices using agile and lean ux agile mancTransforming nhs choices using agile and lean ux agile manc
Transforming nhs choices using agile and lean ux agile mancValtech UK
 
Digital Inclusion in the Public Sector
Digital Inclusion in the Public SectorDigital Inclusion in the Public Sector
Digital Inclusion in the Public SectorValtech UK
 
Presentation compressed
Presentation compressedPresentation compressed
Presentation compressedValtech UK
 
The Mobile Landscape - Do you really need an app?
The Mobile Landscape - Do you really need an app?The Mobile Landscape - Do you really need an app?
The Mobile Landscape - Do you really need an app?Valtech UK
 
Modern Digital Design: The power of Responsive Design
Modern Digital Design: The power of Responsive DesignModern Digital Design: The power of Responsive Design
Modern Digital Design: The power of Responsive DesignValtech UK
 
White Paper: "Designing Around People"
White Paper: "Designing Around People" White Paper: "Designing Around People"
White Paper: "Designing Around People" Valtech UK
 
Simplifying Facebook: Designing Around People
Simplifying Facebook: Designing Around PeopleSimplifying Facebook: Designing Around People
Simplifying Facebook: Designing Around PeopleValtech UK
 
The mobile landscape - Do you really need an app?
The mobile landscape - Do you really need an app?The mobile landscape - Do you really need an app?
The mobile landscape - Do you really need an app?Valtech UK
 
An Introduction to Responsive Design
An Introduction to Responsive DesignAn Introduction to Responsive Design
An Introduction to Responsive DesignValtech UK
 
Customer case - IC companys
Customer case - IC companysCustomer case - IC companys
Customer case - IC companysValtech UK
 
Part 1: "Making Agile Work" Webinar Series: Inception
Part 1: "Making Agile Work" Webinar Series: InceptionPart 1: "Making Agile Work" Webinar Series: Inception
Part 1: "Making Agile Work" Webinar Series: InceptionValtech UK
 
Experience Report: FLIGHTGLOBAL.COM
Experience Report: FLIGHTGLOBAL.COMExperience Report: FLIGHTGLOBAL.COM
Experience Report: FLIGHTGLOBAL.COMValtech UK
 
Agile UX integration
Agile UX integrationAgile UX integration
Agile UX integrationValtech UK
 
Agile in highly regulated environments
Agile in highly regulated environmentsAgile in highly regulated environments
Agile in highly regulated environmentsValtech UK
 
Using CFD, SPC and Kanban on UK GOV IT projects
Using CFD, SPC and Kanban on UK GOV IT projects Using CFD, SPC and Kanban on UK GOV IT projects
Using CFD, SPC and Kanban on UK GOV IT projects Valtech UK
 
Adapting agile to the entreprise
Adapting agile to the entreprise Adapting agile to the entreprise
Adapting agile to the entreprise Valtech UK
 

More from Valtech UK (20)

Get to know your users using Lean UX
Get to know your users using Lean UXGet to know your users using Lean UX
Get to know your users using Lean UX
 
The Art of Visualising Software - Simon Brown
The Art of Visualising Software - Simon BrownThe Art of Visualising Software - Simon Brown
The Art of Visualising Software - Simon Brown
 
Get to know your users
Get to know your users Get to know your users
Get to know your users
 
LeanUX and Agile in the Public Sector
LeanUX and Agile in the Public SectorLeanUX and Agile in the Public Sector
LeanUX and Agile in the Public Sector
 
Transforming nhs choices using agile and lean ux agile manc
Transforming nhs choices using agile and lean ux agile mancTransforming nhs choices using agile and lean ux agile manc
Transforming nhs choices using agile and lean ux agile manc
 
Digital Inclusion in the Public Sector
Digital Inclusion in the Public SectorDigital Inclusion in the Public Sector
Digital Inclusion in the Public Sector
 
Presentation compressed
Presentation compressedPresentation compressed
Presentation compressed
 
The Mobile Landscape - Do you really need an app?
The Mobile Landscape - Do you really need an app?The Mobile Landscape - Do you really need an app?
The Mobile Landscape - Do you really need an app?
 
Modern Digital Design: The power of Responsive Design
Modern Digital Design: The power of Responsive DesignModern Digital Design: The power of Responsive Design
Modern Digital Design: The power of Responsive Design
 
White Paper: "Designing Around People"
White Paper: "Designing Around People" White Paper: "Designing Around People"
White Paper: "Designing Around People"
 
Simplifying Facebook: Designing Around People
Simplifying Facebook: Designing Around PeopleSimplifying Facebook: Designing Around People
Simplifying Facebook: Designing Around People
 
The mobile landscape - Do you really need an app?
The mobile landscape - Do you really need an app?The mobile landscape - Do you really need an app?
The mobile landscape - Do you really need an app?
 
An Introduction to Responsive Design
An Introduction to Responsive DesignAn Introduction to Responsive Design
An Introduction to Responsive Design
 
Customer case - IC companys
Customer case - IC companysCustomer case - IC companys
Customer case - IC companys
 
Part 1: "Making Agile Work" Webinar Series: Inception
Part 1: "Making Agile Work" Webinar Series: InceptionPart 1: "Making Agile Work" Webinar Series: Inception
Part 1: "Making Agile Work" Webinar Series: Inception
 
Experience Report: FLIGHTGLOBAL.COM
Experience Report: FLIGHTGLOBAL.COMExperience Report: FLIGHTGLOBAL.COM
Experience Report: FLIGHTGLOBAL.COM
 
Agile UX integration
Agile UX integrationAgile UX integration
Agile UX integration
 
Agile in highly regulated environments
Agile in highly regulated environmentsAgile in highly regulated environments
Agile in highly regulated environments
 
Using CFD, SPC and Kanban on UK GOV IT projects
Using CFD, SPC and Kanban on UK GOV IT projects Using CFD, SPC and Kanban on UK GOV IT projects
Using CFD, SPC and Kanban on UK GOV IT projects
 
Adapting agile to the entreprise
Adapting agile to the entreprise Adapting agile to the entreprise
Adapting agile to the entreprise
 

Recently uploaded

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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
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
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
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
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
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
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
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
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 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
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
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
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Effective and pragmatic test driven development by Andrew Rendell, Principal Consultant at Valtech

  • 1. EFFECTIVE AND PRAGMATIC TEST DRIVEN DEVELOPMENT ANDREW RENDELL, PRINCIPAL CONSULTANT
  • 2. INTRODUCTION IS TDD REALLY UBIQUITOUS? EVALUATION OF THE APPLICATION OF TDD ON A REAL WORLD PROJECT IMPEDIMENTS AND THEIR RESOLUTION TANGIBLE BENEFITS
  • 3. PROJECT CONTEXT T-MOBILE MOBILE INTERNET PORTAL WEBNWALK3 PERSONALISED EXPERIENCE GO LIVE DATE INVARIANT
  • 4. DEVELOPMENT DYNAMIC STRONG CUSTOMER FOCUS COMMITMENT TO ERROR FREE USER EXPERIENCE CARRIER GRADE SOFTWARE QUALITY PRESSURE TO DELIVER MARKETING DRIVEN HIGHLY COMPETITIVE CONFLICTING DRIVERS RISK ADVERSE CONSERVATIVE HIGHLY COMPETITIVE RAPID ADAPTABILITY
  • 5. “VALTECH BELIEVES THAT AGILE, AND IN PARTICULAR TEST DRIVEN DEVELOPMENT CAN HELP THESE COMPANIES DELIVER QUICKLY AND SAFELY.”
  • 6. MAKING A PROJECT TEST DRIVEN
  • 7. MAKING A PROJECT TEST DRIVEN WHERE WE STARTED HOW THE INTENT WAS COMMUNICATED STRUCTURING THE APPLICATION TO STRUCTURE DEVELOPMENT ACTIVITIES HUMAN INTERACTION WITH DEVELOPERS
  • 8. MAKING A PROJECT TEST DRIVEN DEVELOPERS EXPERIENCE ONE OR TWO WITH TDD EXPERIENCE // MOST HAD GOOD UNDERSTANDING OF TDD THEORY // ALMOST ALL HAD USED JUNIT // MOST HIGH CALIBRE JAVA DEVELOPERS
  • 9. MAKING A PROJECT TEST DRIVEN MANAGEMENT EXPERIENCE EXPERTS IN MOBILE TELCO // GOOD UNDERSTANDING OF AGILE THEORY // READY TO EMBRACE NEW PRACTICES // LONG HISTORY OF WATERFALL, DOCUMENT CENTRIC
  • 10. MAKING A PROJECT TEST DRIVEN AT INCEPTION NO INTENT TO USE TDD END OF INCEPTION SOME JUNIT TESTS // DECIDE TO USE TDD // MEASURE EXISTING COVERAGE // AUDIT EXISTING USE OF TESTS
  • 11. COMMUNICATING THE INTENT MOST IMPORTANT INTERACTIVE SESSIONS TEAM WAS INEXPERIENED ACCEPTED INEVITABILITY OF MAKING MISTAKES
  • 12. TDD THROUGH APPLICATION STRUCTURE WEBNWALK IS A STANDARD MVC APPLICATION INDENTIFIED INTEGRATION PAIN POINT PRESENTATION LAYER / SERVER SIDE DIFFERENT TEAMS, SKILLS, COMPLEXITY, TIMESCALES RIGOROUS DEFINITION OF INTERFACE THROUGH CONTRACT CONTRACT BECOMES STARTING POINT OF DEVELOPMENT
  • 13. EmailWidgetService XXXEmailContract +customerNotAuthenticatedWithPartner() : EmailWidgetModel +oneReadOneUnreadEmail() : EmailWidgetModel +noUneadEmailFiveReadEmail() : EmailWidgetModel +noEmai() : EmailWidgetModel +manyEmails() : EmailWidgetModel +errorGettingEmails() : EmailWidgetModel XXXEmailAcceptanceTest JUnit4 Test XXXEmailWidgetService
  • 14. TOP DOWN DEVELOPMENT Tests EmailAcceptanceTest EmailWidgetService Tests EmailWidgetServiceImplTest EmailWidgetServiceImpl Uses CustomerDAO Tests CustomerDAOImplTest CustomerDAOImpl
  • 15. RESPECT // EMPOWERMENT // AVOID DOGMA // IN RETROSPECT, TOO MUCH FLEXIBILITY ALLOWED, ESPECIALLY FOR LESS EXPERIENCED DEVELOPERS RESPECTING THE DEVELOPERS FREEDOM
  • 17.
  • 18.
  • 19.
  • 20. DISILLUSIONMENT PATTERN SEEN ON SEVERAL PROJECTS COMMON AMONGST NEW PRACTITIONERS EVERYONE WENT THROUGH SOME OF THE STAGES
  • 21. DISILLUSIONMENT TOO FOCUSED ON TDD AS AN OBJECTIVE RATHER THAN AS A VEHICLE VELOCITY BEING MEASURED FOR FIRST TIME HIGHLIGHTS SLIPPAGE TDD BLAMED
  • 22. DOGMATIC APPLICATION ALL NEWCOMERS TO TDD AFFECTED, NOT JUST THOSE LESS EXPERIENCED IN TOOLSET TOO FOCUSED ON THE APPLICATION OF THE TECHNIQUE FAILURE TO PERCEIVE THE DIFFERENT IN VALUE OF DIFFERENT TESTS
  • 23. DOGMATIC APPLICATION BEST DEVELOPERS FOCUSED ON WHY TESTS WERE BEING WRITTEN WROTE AND REWROTE CLASSES TO EXPEDITE TESTING VIEWED INCORRECTLY AS „FAILURE‟ BY NEW DEVELOPERS
  • 24. TRIVIAL EXAMPLE AverageDurationAnalyserImpl.java /** * Obtains the current time. * protected so can be overridden in unit test */ protected long getCurrentTime() { return System.currentTimeMillis(); } AverageDurationAnalyserImplTest.java private static long RIGHT_NOW = 1000; @Before public void onSetup() { analyser = new AverageDurationAnalyserImpl(){ @Override protected long getCurrentTime() {return RIGHT_NOW ;}}; }
  • 26. MEASURABLE BENEFITS IMPROVED CODE STRUCTURE // LESS REDUNDANT EFFORT// VIRTUOUS CIRCLE
  • 27. IMPROVED COHESION STRONG COHESION IS ONE OF THE MOST IMPORTANT ATTRIBUTES OF WELL STRUCTURED CODE TDD NATURALLY ENCOURAGES COHESION TOP DOWN APPROACH MEANS RESPONSIBILITY IS WELL UNDERSTOOD BEFORE CODE IS BEGUN WRITING A TEST WHICH HAS MORE THAN ONE SET OF GOALS IS AN OBVIOUS BAD SMELL AND INDICATES TIME TO DELEGATE
  • 28. LOW COHESION Logic for implementation of transformation Http Client implemented piecemeal for several classes AuctionWidgetModel Tests WidgetService Worker HmlService Tests Tests AuctionWidgetModelTest Tests WorkerTest Tests +testSelling() +testCombineWatchingAndBuyingTotals() Tests Logic for testing data transformation HmlServiceTest Tests implemented in several different classes +testWatchingData()
  • 29. HIGH COHESION All data transformation logic encapsulated in Xml Adaptor. All tests and test data in XmlAdaptorTest. WidgetService Worker HttpClient AuctionWidgetModel XmlAdaptor Tests XmlAdaptorTest
  • 30. A COMMON PROBLEM // TDD ENCOURAGES FOCUS ON WHAT IS REQUIRED // DISCOURAGES SPECULATION SEEMS PARTICULARLY TRUE FOR COMMON INFRASTRUCTURE COMPONENTS YAGNI: YOU AIN‟T GOING TO NEED IT
  • 32. VIRTUOUS CIRCLE OF AGILITY STAKEHOLDERS WERE INCLUDED IN TDD INCREASED CONFIDENCE IN CORRECTNESS COMPARED FAVOURABLY WITH PREVIOUS EXPERIENCE
  • 33. EXAMPLE IDENTIFICATION MODULE HIGH COMPLEXITY AND RISK ALL PARTIES INVOLVED IN ANALYSIS TESTS VERIFY IMPLEMENTATION HUMAN TESTER SIGNS OFF IMPLEMENTATION SUBSEQUENT CHANGES NOT BLOCKED BY MANAGEMENT CONFIDENCE HIGH
  • 34.
  • 35. CONCLUSIONS TEST DRIVEN DEVELOPMENT IS WIDELY KNOWN PRACTICAL EXPERIENCE IS RARER INTRODUCTION CAN BE DIFFICULT THE TECHNIQUE BRINGS REWARDS REAL DIFFERENCE TO DELIVERY OF THE WEBNWALK PLATFORM