GNU Smalltalk Unit Level Testing

A port of Kent Beck's SUnit is delivered with GNU Smalltalk, a brief overview could also be found in the info-documentation (Node SUnit, under Packages).

Additional but squeak-centric information can be found in Eng-Art8-SUnit-V1?.pdf

To use SUnit in GNU Smalltalk, you'll have to file in SUnit, if not done already.

PackageLoader fileInPackage: 'SUnit'!

You'll maybe find

MyTest buildSuiteFromLocalSelectors run printNl!

useful, as it creates a suite containing all tests of MyTest? (methods beginning with test).

If the test fails, you should evaluate

(MyTest new) setUp; testMyFailingTest; tearDown!

as it gives the reason in the displayed walkback.