![]() | Ned Batchelder : Blog | Code | Text | Site XUnit patterns » Home : Blog : January 2007 |
XUnit patternsMonday 8 January 2007 Martin Fowler has updated his Mocks Aren't Stubs article. It looks like a good introduction to a deep understanding of mock object testing. I was particularly struck by the definitions of dummy, fake, stub, and mock objects:
I'd never heard this distinction, but it is a good one. Fowler attributes it to Gerard Meszaro, who it turns out is writing a book about patterns within test development, xUnit Patterns. The whole book is available on the website (for now), and looks like a good compendium of practices and ideas in test developement. I continue to work on how to best incorporate testing into real-world projects. The pressure of time, and the compexity of large systems, both conspire to make testing a real challenge. So I'll be looking through the xUnit Patterns to see what it can add to my understanding.
tagged:
testing» 1 reaction | |
Comments
Yeah, it's nice to have a clear distinction between categories of "unreal" objects, some of them I had never heard of before, even though I thought I knew what the name meant. For small projects or projects where I have a clear specification, I usually do a lot of testing at first. If the project is short enough, I may actually have complete testing. But if it goes on too long, I begin to get too lazy to update my tests or make new ones, and then I write code which invalidates my old tests, and it ends up making the whole thing useless :/ I will definitely be taking a look at that book!
Add a comment: