It is often tempting to skip unit testing for ad-hoc testing. However when done in the appropriate amount unit testing will increase productivity and reliability. It is also a great diagnostic tool. Unit testing is a skill that can get you to the next level as a programmer as well as an organization. It takes discipline and when done in the right amount you should be able to reap the benefits in weeks.
In this article, I will show simple examples on how to move your ad-hoc tests to test classes. The examples use the RawDev framework which makes unit testing as easy as it can possibly be. I will cover what a unit test is, how to create tests and a tool to execute the tests. I will also talk about some of the pitfalls and how to get around them.
Read the full article