How do we make tests a more natural part of the system?

Steve Gilbert steven.l.gilbert at lmco.com
Thu Nov 14 00:46:15 UTC 2002


This may be as good a time as any to have a look at some work that Ted
Kaehler did back in Nov 2001.

Have a look at the thread starting with:
http://lists.squeakfoundation.org/pipermail/squeak-dev/2001-November/006049.html

It's entitled "SUnit Testing merged with Examples for Methods" and
documents some changes that are still in the current image, 3.2 anyway,
that facilitate testing without all of the additional TestCase based
classes.

I think that somehow we could make a run at a way to make adding test
cases as painless as possible, and also eliminate the "bloat" that many
may fear would come from all packages having tests.

Two particularly interesting paragraphs of the thread were:

Ted Kaeler:
"...(In the future, we'd like to have the kind of TestCases that SUnit 
has now, but not have the overhead of doubling the number of classes. 
One way to do this is to make Metaclass do everything that TestCase 
does.  The individual testing methods would begin with a standard 
prefix like 'textSU'.  Any class that has a method whose name begins 
with 'textSU' would be found by TestRunner, and entered into its 
list.  Any comments on this?)"

followed up by a comment by Ward Cunningham:

"...Finally, if Tests are a parallel hierarchy, then perhaps we should
take a cue from the Class-MetaClass parallel hierarchy. This would
suggest that the buttons on the browser should read:
[instance][class][test]"

These ideas might be fuel for our long term direction.

As far as the short term...
Does anyone who has used the TestViaMethodCall and Verifer classes care
to comment on their usefullness as compared to standard TestCase based
testing?

Is this code something that we could leverage to begin producing some
comprehensive system tests?

These tests will be all but necessary to do the kind of modularization
that we are about to embark upon.  It seems that now is as good a time
as any to make things easier on ourselves.

Comments?

Steve Gilbert



More information about the Squeak-dev mailing list