You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by robert burrell donkin <rd...@apache.org> on 2003/08/24 17:48:04 UTC

[OT] musings on unit tests [WAS Re: XMLBeans Apache Project]

i think that depends on what you mean by development :)

i can only speak from experience but i think that's it does definitely 
slow down the rate that new features can be added. i'd guess that every 
hour i spend working on open source projects is probably split around 40% 
40% 20% between main source coding, developing unit tests and creating 
documentation when adding new features. this ways of working is slower per 
added feature than just banging the code out.

on the other hand, i certainly do think that the ratio of bug fix requests 
to enhancement requests has decreased after adopting these strategies. but 
this brings it's own problems since there's now a higher barrier to new 
developers contributing. a memorable quote from a experienced open source 
developer was that it took him two minutes to code a change but two hours 
to create the unit tests.

- robert

On Sunday, August 24, 2003, at 03:39 PM, Christopher Eliot wrote:

> This is getting off-topic, but I'm not sure unit tests
> actually slow down development.  It certainly seems to,
> but I think the reality is that development is faster
> because time spent debugging unit test failures is more
> than made up by time saved testing and debugging runtime
> failures.
>
> Unit tests do for semantics what type checking does for syntax.
>
>> cool :)
>>
>> i've just remembered one more factor: unit tests.
>>
>> these slow development but really do improve quality and reliability. 
>> contributing unit tests are an excellent way for upstream developers to 
>> ensure that continued development does not (accidentally, at least) 
>> break their code.
>>
>> one guideline that you might consider is that all bug reports and 
>> patches contain unit tests that demonstrate the problem. i've found that 
>> having a unit test for a bug or an enhancement really does cut the time 
>> needed to fix it.
>>
>> - robert
>
> Prof. Christopher Eliot
> Department of Computer Science
> University of Massachusetts, Amherst
> eliot@nsm.umass.edu
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
>


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/