I was originally slated to beta test Matt and Sean’s GTAC presentation but due to scheduling difficulties on both ends that didn’t happen so even though this was not on my original list of ones to watch, it was put on that list by the time GTAC came around. The original title was Interaction Based Testing, but in posts on the Agile Testing mailing list Matt is referring to it now as Isolation Based Design though I think I might have renamed it to Mock 101. Aside from some serious volume differences between Matt, Sean and the mic in the audience, the presentation is a really good introduction to the concept of Object Doubles (Mock / Stub / Spy / Dummy).
Notes:
- Any good idea can be implemented poorly
- Balance your test strategy (balanced breakfast pattern) with and appropriate mix of techniques
- When you switch contexts, but don’t switch strategies, things get muddled
- Test subsystems in isolation, not individual classes
- Build facades, then mock out the facades
- The way to use mocks is dependent on your context (Boeing vs web 2.0 startup)
- Do what is right for you, not just because Matt (or anyone else) said to do it
- Mocks are not about speed, it is about removing relationships out of the code
- There is some value to having cascading test failures as it showcases your dependencies
- Ask How is this returning for me? What is my ROI like? Is this working for me?
- The Humble Dialog Box
Direct link here