[TESTS] Call for more tests
Marcus Denker
marcus at ira.uka.de
Wed Apr 16 09:03:55 UTC 2003
Hi Squeakers,
We need more tests. The BaseImage Tests package now has around
330 tests. But this is not enough: It will start to get interesting
at 10000...
Many of these tests will be *really* simple: They simply run methods
and test if the right thing happens.
The interesting thing is that even beginners can be very helpful:
instead of trying the examples from the book in the workspace, why
not write tests instead?
Here's a very short HOWTO start:
1) get the latest Squeak 3.6alpha
2) install the folowing packages from SqueakMap:
-> BaseImage Tests removal (we don't want to run tests twice)
-> SUnit removal (get rid of the old SUnit)
-> SUnit 3.1 (install the new one)
-> BrowseUnit (*very* nice addition to the Browser)
-> BaseImage Tests
3) Now your image is ready for testing: open the testrunner, "run all"
should run all the test (around 340)
4) Add new tests: BrowseUnit will make a new testclass for you if there
is none, then simply add methods that begin with "test", use
"self assert:" or "self should:[]" for testing.
5) Example: testPrinOn, class "UndefinedObjectTest":
testPrintOn
| string |
string := String streamContents: [:stream | nil printOn: stream].
self assert: (string = 'nil').
--
Marcus Denker marcus at ira.uka.de -- Squeak! http://squeak.de
More information about the Squeak-dev
mailing list
|