Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introducing TDD to your project


Published on

Everyone is talking about test driven development (TDD) being so cool and elaborating for both developers and persons responsible for the projects success ( like project managers, project owners, and customers ). But very few projects are using TDD to gain its relieving aspects. How does that go along? Seems many project responsibles are uncertain about the efforts and direct benefits of TDD and step back. This talk is about a transition from a usual project to TDD. Within this talk I will raise some questions to be answered before moving and show the benefits of TDD for each party of the project setup. We will find possible impediments to be faced and will see how to get rid of them.

Published in: Design
  • Be the first to comment

Introducing TDD to your project

  1. 1. Introducing test driven development to your projectBastian Feder Confoo 2011, 10th March 2011
  2. 2. Me, myself & I PHP since 2001 Testing and Quality coach @ Liip Inc. Opensource addict PHP manual translations FluentDOM phpdox
  3. 3. What is TDD? „TDD is a software development process whichrelies on the repetition of very short development cycles.“ (wikipedia)
  4. 4. Development cycle Test Refactor Develop
  5. 5. Positive feedback cycle
  6. 6. Benefits Higher productivity Higher confidence Adjustable complexity Modularized & clean source code
  7. 7. Benefits (cont.) Less code Shorter time to market Agility Continuity
  8. 8. Drawbacks TDD difficult if functional tests required Test are created by developer who does the implementation High number of unit tests may lead to false sense of security Full management support required
  9. 9. Transition
  10. 10. What to do before?
  11. 11. Rate your software Software metrics Executable line of code (eloc) Cyclomatic complexity (ccn) Weighted method count (wmc) (reverse) Code rank (cr) …
  12. 12. Rate your software (cont.) Documentation Api Tutorials Wiki …
  13. 13. Meanwhile
  14. 14. Meanwhile Setup standards Coding guidelines Definition of done …
  15. 15. Meanwhile (cont.) Setup and prepare your environment Test server (CI) Development machines
  16. 16. Meanwhile (cont.) Introduce & educate Developers Project responsibles Management
  17. 17. After that
  18. 18. Whats next? Determine hotspots of your software Highly used classes/methods Missing abstractions
  19. 19. Whats next? (cont.) Eliminate one by one Refactor to testability (static, singletons, fixed dependencies) Small iterations to improve the legacy code
  20. 20. Establish
  21. 21. Establish Stick to tests, even when it is hard Act in increments to adapt your developement method to your needs Alter your way of working
  22. 22. Establish (cont.) Talk about the source Keep persons involved up to date Constant learning and education
  23. 23. Questions
  24. 24. Links Rate it @ Pdepend website ( Working Effectively with Legacy Code ( Martin/dp/0131177052/ref=wl_it_dp_o? ie=UTF8&coliid=IA3NS7G5GYIT&colid=VCXWUWFBWD5X) OO Design Quality Metrics (
  25. 25. PHP5.3 Powerworkshop New features of PHP5.3 Best Pratices using OOP PHPUnit PHPDocumentor
  26. 26. License  This set of slides and the source code included in the download package is licensed under theCreative Commons Attribution-Noncommercial- Share Alike 2.0 Generic License