About   Forum   Wiki   Home  

       
    Managed Chaos      
   
Naresh Jain’s Weblog on Object thinking, Patterns, Open Source, Agile and Adventure Sports

 
`
 
Tags
Recent Comments
Quick Search
Recent Entries
Categories
Archives
September 2005
M T W T F S S
« Aug   Oct »
 1234
567891011
12131415161718
19202122232425
2627282930  
Add to Technorati Favorites

Syndicate This Blog
Entries (RSS)
Comments (RSS)

Archive for September 10th, 2005

Pragmatic Unit Testing

Saturday, September 10th, 2005

Recently I was introduced to the Pragmatic Unit Testing book. This seems to be a nice summary of what we have been following as guiding light for unit testing on various projects.

One thing to note here is, in the Agile world, Unit tests are not a testing mechanism.

Reasons why I write unit tests:
1.They are the best, up_to_date functional spec.
2.They are the best, up_to_date design spec. If I want to know how this class behaves or how this class interacts with other classes, I would look at its unit test
3.They form a test harness around my code. Makes me feel so much secure about my code. I‘m no more in this illusionary world that my code works.

While I still have to figure out a best answer for what to test and what not to test, there is a good summary of unit testing principles that can help.
http://www.pragmaticprogrammer.com/starter_kit/utj/StandaloneSummary.pdf

    Licensed under
Creative Commons License
Design by vikivix