Rudi Larno's WebLog

The One And Many

Unit Tests as documentation

Since Unit Testing is becomming a defacto used practice in modern programming, this is an interesting topic to say the least:

The next XP BE meeting will be hosted by Philippe De Bruycker of the
Federal Administration of Foreign Affairs in Brussels.

The topic of the evening will be "Unit Tests as documentation". If you
have something to tell about the subject, let us know. Even better, if
you have some unit tested code, why not bring it along so that we can
see if the tests (help) document your code?

More info and registration at
http://wiki.xp.be/scripts/view/Xpbe/XpBeMeeting21122004

Because you need a badge to get in (and out), register at least a week
before the meeting. Put your first+last name and car registration number
  on the list on the wiki.

Published Wednesday, December 08, 2004 2:58 PM by Rudi Larno
Filed under: ,

Comments

 

Howard van Rooijen said:

I talk about using Unit Tests as documentation (and even generating documentation from Unit Tests) in my presentation "The Value of Agile Methods".

http://blogs.conchango.com/howardvanrooijen/archive/2004/12/07/397.aspx#AgileSpec
December 8, 2004 3:36 PM
 

Sam said:

Yep, Unit Tests are a good way to show how a library should be used.
They are some kind of sample cases. What makes them different is that you keep Unit Tests up to date (to pass the tests), sample cases usually decay over (short) time.

Sam
December 8, 2004 3:42 PM
 

Howard van Rooijen said:

Sam,

One of the things I usually do is bake the code from the Unit Tests into the XML Documentation <Examle><Code> for the class being tested - then at least when you gen your documentation the user has a clue about how to use your API.

/Howard
December 8, 2004 4:11 PM
 

dhana said:

hai friends,

if any one have sample Unit testing document . tell me . my mail ID: dhana_java@yahoo.com.

thaks
by
dhana
January 3, 2005 6:19 AM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker