|
|
Test-Driven Development: By ExampleOverview
SynopsisIn "Test-Driven Development", Kent Beck illustrates the TDD techniques using two, small projects as examples. The referenced TDD patterns and refactorings support agile methods, encouraging simple designs and test suites that inspire confidence. The promise: reliable, bug-free code no matter what its level of complexity. (back cover) Table of Contents
PraisesBeck uses tutorials to describe the xUnit test framework and patterns (for testing, design, and refactoring) applied. Note: there are the obvious differences between language-specific implementations (e.g., Java vs. C++), and variations for a given language, such as C++ (i.e., CppUnit, CxxTest, Unit++). In practice, my experience with TDD is positive. Initially, my productivity on developing new functionality generally felt slower, but that could also have been explained by other things as well (e.g., sometimes focussing too much on portability concerns, and falling back onto top-down coding habits). However, I'm definitely noticed burstiness on refactorings, which supports Beck's claim re: increasing confidence from the tests. CriticismsOnly a handful of refactorings are provided. For a more comprehensive list, consult "Refactoring" by Martin Fowler. Final AnalysisTDD advocates bottom-up construction, making all tests pass before adding a new test, refactoring to refine your design, and to not expect "portability" between test frameworks. This book is a must-have/keeper, i.e., it's in the easy-to-reach section of my bookshelf, when it's not on my desk. CopyrightCopyright © 2003 Anthon Pang. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". |