improving the quality of the image
Keith Hodges
keith_hodges at yahoo.co.uk
Thu Feb 1 00:17:21 UTC 2007
Dear Bill,
you ask whether a test can be in more than one suite, absolutely.
First of all classes explicitly define and publish their own suites.
You could have:
#allStandardTests defined as all methods matching 'include:test*'
#testsBeingWorkedOn defined as methods in method category 'include at wip'
thus some tests may be members of both groups.
I shall append the relevant information from the class description for you
Keith
------------------
More flexible suite building API:
Asking an abstract class for #suite: will build the entire suite for all
of its concrete subclasses.
Asking a concrete class for #suite: will just return the suite for that
one class.
Suites are defined as class methods for a testcase class.
example:
MyTestCase>>myTestSuite
"all 'test*' methods, but not those in category 'long tests', or
tests flagged with #BrokenTest"
^ #( 'include:test*' 'exclude at long tests' 'exclude#BrokenTest' )
Suites are obtained via either
a) a selector which references a defined suite or
b) an explicit string defining a match
c) an array of a & b.
TestCase suite: #myTestSuite.
TestCase suite: 'include:test*'.
TestCase suite: #( 'include:test*' 'include:longtest*').
The array can be used to combine other suites
example:
myTestSuiteWithLongTests
^ #( #myTestSuite 'include at long tests' )
Published Suites API
#publishedSuites provides a list of test suites published by each
TestCase class that can be picked in the TestRunner. This provides a
natural UI for selecting from a range of testing scenarios. e.g. tests
for different products, releases, platforms, performance monitoring
tests, long tests, tests needing additional services (db)
Published Filters API
#published filters provides a list of filters that can be picked in the
TestRunner. This provides a natural UI for including/excluding groups of
tests from a suite.
publishedFilters
^#( #filterOutBrokenTests )
filterOutBrokenTests
^ 'exclude#BrokenTest'
___________________________________________________________
Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
More information about the Squeak-dev
mailing list
|