tags:

views:

47

answers:

6

Hi,

this is something I know I should embrass in my coding projects but, due to lack of knowledge and my legendary lazyness, I do not do.

In fact, when I do them, I feel like overloaded and I finally give up.

What I am looking for is a good book/tutorial on how to really write good tests -i.e useful and covering a large spectrum of the code -.

Regards

+2  A: 

I would suggest taking a look at 'katas' - in particular testing katas. Without knowing what language you use, it's hard to give a more concrete answer.

http://blog.objectmentor.com/articles/2009/11/21/whats-all-this-nonsense-about-katas

Tejs
I am mainly developing in:- erlang- *lisp- python- java- SQLBut I need a general approach to the unit-testing science.Thank you
Xavier Maillard
+3  A: 

Excellent book that covers unit tests for legacy code in particular is Michael Feather's "Working Effectively with Legacy Code"

Working Effectively with Legacy Code

Bruno Rothgiesser
Big +1 - great book!
TrueWill
Sounds great ! Thank you.
Xavier Maillard
+2  A: 

Roy Osherove's The Art of Unit Testing, especially if you're working in .NET.

TrueWill
+1  A: 

Hard to know what language or platform you mean? In regards to .Net Test-Driven Development in Microsoft® .NET. Provides you TDD principles and practices with examples. Have a copy at home and the office. Used it as a primer before getting into TDD and NUnit myself .

subv3rsion
+1  A: 

This guy knows what he's talking about: http://orthocoders.com/

Sean B
+1  A: 

If you are looking for a good book going over how to Unit Test I would recommend Kent Beck's : Test Driven Development: By Example. He is the person who really started the idea of Unit Testing, so regardless of language this would be a great book to read to get a good foundation.

Also, Don't let the title discourage you. It does talk about TDD, but it's really just a good easy overview, of how to write effective unit tests, and how they should affect your design which is a key component of writing unit tests.

Daniel Roop