Testing your code – follow up

Jul 10, 2007

I’ve received quite a few e-mails about my last post about unit testing and have followed some reactions around the blogosphere as well. There seem to be common believe that I don’t like unit testing or advice against it. This was not the intent.

I know the post sounds very much against unit testing, but that is just poor semantic skills from my side. To sum up what I really meant; here it is:

Unit testing is very useful in some scenarios, but is overkill in others.

Now you might be thinking: So how do I know when unit testing is overkill? The short answer is experience.

If you have enough experience to fully understand the scope of your project and find that you have done similar things many times before successful, then you know. It’s that simple.

When in doubt, unit test - you can do it in a console.

* $4.95/month BlogEngine.net Hosting – Click Here!
Comments are closed

About the author

Mads Kristensen

Mads Kristensen
Program Manager at the Microsoft Web Platform team and founder of BlogEngine.NET.

More...

Month List

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way.