Advanced TDD: Fake It Outside-In


Details
The London School of TDD leverages the Outside-In Design process. This leads to a design that fits to the problem avoiding YAGNI and gives good guidance regarding what to write when. Nevertheless its heavy use of mocking comes with the downside of worse maintainability. Test code becomes harder to understand and refactorings require more effort.
In this session we look at alternative Outside-In TDD approach where mocking is replaced by the use of fake data. Fake data originating from the test assertion become your primary design driver. On an incremental de-structuring journey down the call stack the data morphs more and more into structure. Design therefore develops "Outside-In" but on a "green bar" in the refactoring phase as opposed to London Style on a "red bar" when writing your tests. The remaining real "logic" is tackled with regular unit-test level TDD.
I show you how this promising approach works and we then immediately try it out in a coding session. So bring your laptop. As the topic is a bit advanced I recommend having a good TDD knowledge. Beeing familiar with the London School is a plus.
See you,
David
References
- For the "Fake It" pattern see Kent Beck's "TDD by example", section "Implementation Strategies" http://www.eecs.yorku.ca/course_archive/2003-04/W/3311/sectionM/case_studies/money/KentBeck_TDD_byexample.pdf
- Intro to London School Outside-In TDD http://coding-is-like-cooking.info/2013/04/outside-in-development-with-double-loop-tdd

Advanced TDD: Fake It Outside-In