Unless developers are trained about which tests to write, how to write them, when to refactor code, and the techniques for breaking dependencies, testing can become unsustainable as projects mature. We teach how to make Test-Driven Development sustainable with a focus on deriving maximum value (technical and business) from minimal effort and cost.


How TDD relates to ATDD, emergent design, SOLID design principles, and design patterns are also included.


Course Objectives: 

This course teaches participants the sustainable approach to Test-Driven Development. The practice of Test-Driven Development, which utilizes Refactoring and Unit Testing in a particularly fine-grained way, is demonstrated. Hands-on TDD coding will dominate throughout.


Learning Objectives: 

In this course, you will learn:

  • Why and how to be "test-driven"

  • How to analyze requirements to obtain better tests

  • How to write unit tests

  • How to use mock objects

  • How to refactor legacy code

  • How to use an XUnit testing framework (Junit, MSTest, or Jest)

  • A variety of refactoring techniques, with hands-on exercises to solidify this knowledge


Day 1: Techniques

  • A brief overview of the motivations behind Agility, and TDD specifically

  • As a group, we all get the testing framework up and running on all needed machines.

  • Review Code Qualities, and how they relate to Testing and Testability

  • Unit-testing in general, leading to the benefits of TDD

  • A small Unit-testing/TDD exercise


Day 2: Design

  • Mock Objects, with an exercise

  • Code Smells, and Refactoring

  • Refactoring to the open-closed, just in time design

  • Legacy code refactoring exercise and debrief


Day 3: Reality

  • TDD and Design, revisiting the exercise from Day 1

  • TDD and Design, putting it all together. This includes a larger hands-on lab project.

Full Description

The practice of Agile Software Development requires, among other things, a high degree of flexibility in the coding process. As we get feedback from clients, stakeholders, and end users, we want to be able to evolve our design and functionality to meet their needs and expectations.


This implies an incremental process, with frequent (almost constant) change to the code we’re working on. Each change is an opportunity to make the product more appropriate to the needs it is intended to address. However, change can also be dangerous if it is not accomplished in a way that avoids code decay and protects against introducing bugs.


This course teaches the skills of unit testing, refactoring, and incremental development, but we take it farther than this. Unless developers are trained about which tests to write, how to write them, when to refactor code, and techniques for breaking dependencies, testing can become unsustainable as projects mature.


We teach sustainable test-driven development, with a focus on deriving maximum value (technical and business) from minimal effort and cost. We do this using a blend of lecture, demonstration, and hands-on coding exercises. When you leave this course you will have actually done test-driven development, will have refactored both new and legacy code, will have created mock objects and injected them for testing, and will understand how to keep your test suite from becoming a maintenance problem as it grows. You will also learn how testing, done correctly, can improve both your analysis and design skills.

Background knowledge

Anyone weak in object-orientation should read “An Introduction to Object-Oriented Software Development” and “The Object-Oriented Paradigm” from Design Patterns Explained: A New Perspective on Object-Oriented Design (Second Edition)

Students who have not taken the Net Objectives course Design Patterns Explained or Design Patterns for Agile Developer) should view the recorded presentations at Code Qualities and Advice From the Gang of Four and the Strategy Pattern

Students should have at least minimal proficiency with the language of the course, which is usually Java or C# (Another language or combination can be used by prior arrangement.)

Students who do not t know the UML should read Chapter 2 "The UML—The Unified Modeling Language" from Design Patterns Explained: A New Perspective on Object-Oriented Design


Participants should have a solid background in object-orientation, an object-oriented language such as Java, C#, or C++, and UML.

Participants should be familiar with Code Qualities and the Advice from the Gang of Four.

Max class size



3 Days




Sustainable Test-Driven Development



Copyright © Net Objectives, Inc. All Rights Reserved