Telerik blogs

If you’ve never done Test Driven Development or aren’t even sure what this "crazy TDD stuff” is all about than this is the series for you. Over the next 30 days this series of posts take you from “I can spell TDD” to being able to consider yourself a “functional” TDD developer. Of course TDD is a very deep topic and truly mastering it will take quite a bit of time, but the rewards are well worth it. Along the way I’ll be showing you how tools like JustCode and JustMock can help you in your practice of TDD.

Previous Posts in this Series:  30 Days of TDD – Day 24 – Strictly Mocking 

Question #1

Mike Shepard asks:

Do you think that having well written (and thorough) specifications are a necessary condition to using TDD?

In my experience I have rarely seen a system that is fully specified enough to write unit tests sufficient to cover all of the system behavior.

Thanks for your question Mike.

I think it’s important to have a good understanding of the system or application you are trying to build up front. I also think it’s a good idea to have an idea what your requirements and specifications are going to be as soon as you can. However I also understand that in most systems this is not possible or practical. Things get missed, forgotten and overlooked all the time. This is one of the things that agile methodologies like Scrum try to address.

My goal with TDD (and by extension, agile) is not to try to define every possible detail of the application up front. Instead I try to get as much information about the application I’m building as I need to get started. From there I try to address the application in a feature by feature basis.

Taking that a step further, I’m not trying to derive every test condition of my application up front either; just the specific system behavior I’m addressing at the moment. This saves me from getting into a never-ending loop of requirements gathering (analysis paralysis) and keeps me from worrying too much about features in my application that my never actually get scheduled for development.

 

Continue the TDD journey:

JustMock banner

JustCode download banner image


About the Author

James Bender

is a Developer and has been involved in software development and architecture for almost 20 years. He has built everything from small, single-user applications to Enterprise-scale, multi-user systems. His specialties are .NET development and architecture, TDD, Web Development, cloud computing, and agile development methodologies. James is a Microsoft MVP and the author of two books; "Professional Test Driven Development with C#" which was released in May of 2011 and "Windows 8 Apps with HTML5 and JavaScript" which will be available soon. James has a blog at JamesCBender.com and his Twitter ID is @JamesBender. Google Profile

Comments

Comments are disabled in preview mode.