Friday, October 24, 2008

Mocking is good thing… when unit testing at least – Intro to Mocking

CodeProject - Introduction to Mocking

“Mocking is an integral part of unit testing. Although you can run your unit tests without use of mocking but it will drastically slow down the executing time of unit tests and also will be dependent on external resources. In this article we will explain mocking and different benefits that we can achieve by introducing mocking in our unit tests.

In this article we introduced the concepts behind Mocking. Mocking helps to improve unit tests by removing the outside dependencies which results in better, faster, independent unit tests.

We hope you liked the article, happy programming!

NOTE: We have also created a screencast on this subject which you can view using the following link: Screencast: Introduction to Mocking

Mocking is something I understand, but not having done it, my level understanding is questionable. On my current project we’re now doing major “automated/integration” testing (with hundreds of individual tests and thousands of data driven tests) but little to no “real unit” testing. Now I’m extremely happy with our testing as it is helping us deliver a MUCH better product and provides an outstanding safety net for code changes but I want to grow toward also doing actual unit testing too.

Hence my interest in mocking…

No comments:

Post a Comment

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...