Learning TDD by looking at other peoples tests

Roy Osherove is a leading expert in TDD – he had a brilliant podcast with Scott Hanselman recently and his blog makes for in-depth reading on TDD and Unit Testing.  In particular check out the Test Reviews of publically released Unit Tests – including nerddiner, MVC, and Unity.  This gives a much needed real world critique of tests that people are actually writing – in my experience developers find this sort of thing very informative and helpful.  I would recommend spending some time watching these if you are at all interested in TDD (as more and more developers are…)

As a sample what is wrong with the following test:

image

If you got the fact that the EventDate will change every time you run the test, that’s good, but there are quite a few other problems here that Roy highlights – I’ll leave it up to you to watch the video and find out for yourself!

 

Cheers

Ian

Technorati Tags:

Disclosure:  bbits are hosting a TDD masterclass with Roy from September 21-25 here in the UK.  Every delegate gets hands-on tutoring from Roy himself, together with a copy of his book, The Art of Unit Testing and other goodies.  Spaces are strictly limited to 20 delegates, and there are a few early bird discounts available if you are quick here:  http://amiando.com/TDDMasterclass ;-)

posted @ Monday, July 06, 2009 6:29 PM

Print

Comments on this entry:

# re: Learning TDD by looking at other peoples tests

Left by Turfez at 7/10/2009 4:18 PM
Gravatar
Thanks for sharing

# re: Learning TDD by looking at other peoples tests

Left by Software Testing India at 7/27/2009 7:13 AM
Gravatar
Thanks for giving very essential information.

# re: Learning TDD by looking at other peoples tests

Left by microsoft sharepoint development at 7/27/2009 7:17 AM
Gravatar
Great Post! Really very useful information is given. Thanks.

# re: Learning TDD by looking at other peoples tests

Left by IT security services at 7/29/2009 6:13 AM
Gravatar
Nice Blog! Thanks for sharing a very useful one.
Comments have been closed on this topic.
«September»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789