Test Driven Development: By Example

Book description

Quite simply, test-driven development is meant to eliminate fear in application development. While some fear is healthy (often viewed as a conscience that tells programmers to "be careful!"), the author believes that byproducts of fear include tentative, grumpy, and uncommunicative programmers who are unable to absorb constructive criticism. When programming teams buy into TDD, they immediately see positive results. They eliminate the fear involved in their jobs, and are better equipped to tackle the difficult challenges that face them. TDD eliminates tentative traits, it teaches programmers to communicate, and it encourages team members to seek out criticism However, even the author admits that grumpiness must be worked out individually! In short, the premise behind TDD is that code should be continually tested and refactored. Kent Beck teaches programmers by example, so they can painlessly and dramatically increase the quality of their work.

.

Table of contents

  1. Cover Page
  2. About This eBook
  3. Halftitle Page
  4. Title Page
  5. Copyright Page
  6. Dedication
  7. Contents
  8. Preface
    1. Courage
  9. Acknowledgments
  10. Introduction
  11. Part I: The Money Example
    1. Chapter 1. Multi-Currency Money
    2. Chapter 2. Degenerate Objects
    3. Chapter 3. Equality for All
    4. Chapter 4. Privacy
    5. Chapter 5. Franc-ly Speaking
    6. Chapter 6. Equality for All, Redux
    7. Chapter 7. Apples and Oranges
    8. Chapter 8. Makin’ Objects
    9. Chapter 9. Times We’re Livin’ In
    10. Chapter 10. Interesting Times
    11. Chapter 11. The Root of All Evil
    12. Chapter 12. Addition, Finally
    13. Chapter 13. Make It
    14. Chapter 14. Change
    15. Chapter 15. Mixed Currencies
    16. Chapter 16. Abstraction, Finally
    17. Chapter 17. Money Retrospective
      1. What’s Next?
      2. Metaphor
      3. JUnit Usage
      4. Code Metrics
      5. Process
      6. Test Quality
      7. One Last Review
  12. Part II: The xUnit Example
    1. Chapter 18. First Steps to xUnit
    2. Chapter 19. Set the Table
    3. Chapter 20. Cleaning Up After
    4. Chapter 21. Counting
    5. Chapter 22. Dealing with Failure
    6. Chapter 23. How Suite It Is
    7. Chapter 24. xUnit Retrospective
  13. Part III: Patterns for Test-Driven Development
    1. Chapter 25. Test-Driven Development Patterns
      1. Test (noun)
      2. Isolated Test
      3. Test List
      4. Test First
      5. Assert First
      6. Test Data
      7. Evident Data
    2. Chapter 26. Red Bar Patterns
      1. One Step Test
      2. Starter Test
      3. Explanation Test
      4. Learning Test1
      5. Another Test
      6. Regression Test
      7. Break
      8. Do Over
      9. Cheap Desk, Nice Chair
    3. Chapter 27. Testing Patterns
      1. Child Test
      2. Mock Object
      3. Self Shunt
      4. Log String
      5. Crash Test Dummy
      6. Broken Test
      7. Clean Check-in
    4. Chapter 28. Green Bar Patterns
      1. Fake It (’Til You Make It)
      2. Triangulate
      3. Obvious Implementation
      4. One to Many
    5. Chapter 29. xUnit Patterns
      1. Assertion
      2. Fixture
      3. External Fixture
      4. Test Method
      5. Exception Test
      6. All Tests
    6. Chapter 30. Design Patterns
      1. Command
      2. Value Object
      3. Null Object
      4. Template Method
      5. Pluggable Object
      6. Pluggable Selector3
      7. Factory Method
      8. Imposter
      9. Composite
      10. Collecting Parameter
      11. Singleton
    7. Chapter 31. Refactoring
      1. Reconcile Differences
      2. Isolate Change
      3. Migrate Data
      4. Extract Method
      5. Inline Method
      6. Extract Interface
      7. Move Method
      8. Method Object
      9. Add Parameter
      10. Method Parameter to Constructor Parameter
    8. Chapter 32. Mastering TDD
      1. How large should your steps be?
      2. What don’t you have to test?
      3. How do you know if you have good tests?
      4. How does TDD lead to frameworks?
      5. How much feedback do you need?
      6. When should you delete tests?
      7. How do the programming language and environment influence TDD?
      8. Can you test drive enormous systems?
      9. Can you drive development with application-level tests?
      10. How do you switch to TDD midstream?
      11. Who is TDD intended for?
      12. Is TDD sensitive to initial conditions?
      13. How does TDD relate to patterns?
      14. Why does TDD work?
      15. What’s with the name?
      16. How does TDD relate to the practices of Extreme Programming?
      17. Darach’s Challenge
  14. Appendix I. Influence Diagrams
    1. Feedback
  15. Appendix II. Fibonacci
  16. Afterword
  17. Index
  18. Code Snippets

Product information

  • Title: Test Driven Development: By Example
  • Author(s): Kent Beck
  • Release date: November 2002
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 0321146530