SUnit Testing merged with Examples for Methods

Pennell, David DPennell at quallaby.com
Fri Nov 30 21:04:57 UTC 2001


[Lots of cool stuff snipped]
 
> (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?)

We have found it useful to organize tests into categories (unit test,
integration, performance, hmm - we now have a "broken" category).  We
have a different TestRunner that allows you to select the categories
that you want to run (and some other enhancements).  It has proven
useful to run all of the unit tests without running the time-consuming
performance tests, or vice-versa. 

At the moment, this is all in VW and uses VW's pragma facilities for 
categorizing test methods. Add as many <category: #cat> lines as you 
want to a method, save and it shows up in the test runner.

Assuming nobody wants to volunteer to implement a similar pragma
facility; an alternative way to do this is to use the standard method
category with a naming convention (SUnit-performance,...) instead
of relying on a naming convention for methods.

-david





More information about the Squeak-dev mailing list