- Learn the history and value of Test-Driven Development
- Explore the five practices that comprise TDD
- Understand the test-first mindset and use it as Just-in-Time problem analysis
- Learn refactoring as Just-in-Time design
- Practice adding tests to legacy code
- Learn about emergent design and simple design
- Use mock objects to decouple difficult dependencies
Essential Test-Driven Development is a 3-day course for developers, providing hands-on experience with the techniques of Test-Driven Development (TDD). This course is designed for experienced developers who are comfortable with their programming language and the basics of object-oriented design. Attendees learn the techniques of test-first, refactoring, mock objects, and others. They learn how these techniques provide and maintain a very low defect-count, plus why TDD helps developers work fearlessly, swiftly, and comfortably on new features and bug-fixes. Attendees will also learn how to work on legacy code: building test-coverage for critical areas, and protecting areas of the legacy system that do not yet require any alteration.
Who Should Attend/Prerequisites
This course involves hands-on programming. Please bring a laptop with your IDE loaded. If you have any difficulty bringing a laptop, please let us know immediately.
3-Day Course Outline
Introductions and Logistics
High-Level Overview, Basics, and Getting Started
Basic syntax for the xUnit family of unit-testing frameworks
Group TDD exercise/lab
Review the basic steps
Parsing "unit test"
The big picture exercise
Discipline: A user-friendly definition
Refactoring and Design
The developers "Oath of Athens"
Brief review of "simple design" rules, emergent design and others
Refactoring to OCP
Map of Mars: Demonstrating the Open-Closed Principle (OCP), refactoring, and emergent design
Just-in-Time problem analysis
The computer-science perspective
Password checker exercise
The broken set exercise
Mock historian exercise
Two simple approaches to building mocks
The LunEx exercise
Definitions of "legacy"
What code to deal with today
The testing/refactoring, chicken/egg problem
The Mess-Trek exercise
Putting it All Together
The battleship game exercise
Other Topics (Time Permitting)
TDD and agile
Class Daily Schedule
Training Course Fee Includes