AW: Tests were are you?

ducasse ducasse at iam.unibe.ch
Wed Oct 15 09:38:15 UTC 2003


I agree. I spent more time writing tests for serious stuff than coding.
Still my point was how can we can more apparent tests so that the 
community gets this point and can learn.

Stef

On Mercredi, oct 15, 2003, at 10:45 Europe/Zurich, 
Torsten.Bergmann at phaidros.com wrote:

> Writing a test to any class in the system (as stephane suggested) is 
> not
> a good way. You have a lot of work since you have to adapt test cases
> anytime you change a single class.
> SUnit means you have to write a test for the "interface" of a unit. The
> interface is a contract and the unit test proves that the contract is
> fulfilled.
>
> Think of the following scenario: you have a smalltalk module/package 
> for
> doing FTP implemented in 10 classes. Your tests should prove that you
> are able to do FTP with the package by testing one or two interface 
> classes.
> If you reduce the number of helper classes, optimize the code or build
> new helper classes in the package your test as well as other packages 
> should
> not be affected.
>
> Writing good tests is much harder than writing good code!



More information about the Squeak-dev mailing list