Practical Test-Driven Development

technical contenthands-on learning3-day class

After completing this course you will be able to…

technical content
  • place TDD in its proper context in the development process
  • make informed judgments of when to use TDD, and know why you are using it
  • isolate code appropriately to enable automated unit testing and TDD
  • apply TDD both as a software design technique and as a unit-level regression testing technique.
  • develop new code in a test-driven fashion with both the classic and mockist styles of TDD
  • balance up-front design with emergent design based on context
  • recognize code smells and refactor code to address them
  • remediate monolithic legacy code with specific refactoring and testing techniques


  • Audience: Software developers (programmers, testers, architects)
  • Prerequisites:
    1. Some real-world experience in software development, support, and/or delivery.
    2. Basic proficiency in the programming language used in class.
  • Duration: 3 days
  • Format: Classroom environment with live instructor, in person
  • Variants:
      • Public offering – standard course
      • Internal offering – customized course
      • Java, Ruby*, Scala*, Python*

    * in development

  • Pricing: Please contact us at

Class Agenda

Day 1 – morning

  • Introductions and logistics
  • Learning objectives
  • ESVP (Explorer – Shopper – Vacationer – Prisoner)
  • Initial coding exercise – FizzBuzz
  • Goals of a professional programmer
  • TDD overview video
  • Retrospective – how is the class going so far?

Day 1 – afternoon

  • Microtests
  • The TDD cycle (Red – Green – Refactor)
  • First TDD coding exercise – Prime Factors
  • Delivering vertical slices of functionality
  • Up-front design and emergent design
  • Development approach and “time until done”
  • Second TDD coding exercise – RPN Calculator
  • Retrospective – how was the first day? Anything to change for Day 2?

Day 2 – morning

  • A command-line interface for the RPN calculator
  • Is TDD a development technique or a testing technique?
  • Structure of an automated test case
  • What is a unit test?
  • Code isolation
  • Different ways of gaining confidence in our code
  • The test automation pyramid
  • Testing versus checking
  • Unit tests and the continuous delivery pipeline
  • Schools or styles of TDD
  • Third TDD coding exercise – ATM client

Day 2 – afternoon

  • Software design principles
  • Code smells
  • Refactoring demonstration
  • Refactoring exercise
  • Retrospective – How was the 2nd day? Anything to change for day 3?

Day 3 – morning

  • A few design patterns
  • Refactoring toward patterns
  • Is emergent architecture possible?
  • TDD and frameworks
  • TDD and COTS products
  • TDD and configurable application platforms
  • Living with large automated test suites

Day 3 – afternoon

  • Working with legacy code
  • Baking refactoring into your normal work flow
  • The case against unit testing and TDD
  • Course retrospective