Feeds:
Posts
Comments

Posts Tagged ‘Osherove’


Art of Unit Testing

So, I recently decided that I would really start to get into unit testing and try out Test Driven Development. Where to start?

Personally I have trouble picking something up that I have no clue about. I can’t just sit down and start fiddling around with nUnit, or similar frameworks for unit testing, without quickly loosing motivation. It is very discouraging to know something should be possible but not know how, search on the net how to do it and then the next line run into the same issue. After a while I loose heart and then motivation gets shot down quickly after that.

I also find it quite hard to get best practices and all that knowledge about how things work from searching the internet. I like to be taken through the subject at a measured pace with a plan in mind.

In comes The Art of Unit Testing.

For a complete novice or for someone who has never worked with Unit Testing but knows some of the theory this is a good book to start with. For someone who has worked with unit tests and has a good grasp of unit testing this book is probably a bit basic even though I guess it could be a good way to review your skills.

The book takes it slowly from the start and builds all the way up to advanced concepts such as mocks, constructor injection and when to use stubs or mocks. It also gives tips on how to get a company to start using unit testing and a short chapter on how to get legacy code under test. It also lists the more important of the frameworks that are used with unit testing, such as testing frameworks, test coverage tools, dependency finder tools etc.

The book focuses on .net and primarily the nUnit-framework but people using other languages benefit from the techniques as these are usually applicable no matter what language is used.

A good and comprehensive read for those who are new to unit testing and a good review of skills for the experienced.

Read Full Post »