Wednesday, July 22, 2009

What is Assessments?

Assessments is a Smalltalk test framework like SUnit. Unlike SUnit, however, it is designed to be flexible and extensible. So, for example, whereas there are many mutually incompatible SUnit logging facilities, in Assessments you can have multiple logging facilities working at the same time. The key criterion is that using Assessments should not force anybody to modify the framework.

Moreover, Assessments also runs tests from other test frameworks, such as SUnit, SUnit VM (including SUnit Benchmarks and SUnit Based Validation), and SUnitToo. The Assessments execution machinery is quite powerful, and literally takes over the other frameworks seamlessly and transparently. Basically, you load Assessments, it detects what frameworks are in the image, and acts accordingly.

Instead of the approach taken by the SUnitToo bridge, Assessments does not modify or create code to run SUnit tests. Moreover, users do not need to make any changes to their existing SUnit tests either. Therefore, using Assessments does not invalidate any existing SUnit tests. In fact, you can continue writing your favorite variety of SUnit tests because Assessments is backwards compatible with them. Even though SUnit tests may not be Assessments' native tests, you still get all the advantages of a better test execution engine.

The Fundamentals' chapter on polymorphism documents many of the techniques and constructs that enable Assessments' flexibility (polymorphism is king). I spoke briefly about Assessments at ESUG 2008. The slides are here, the video is here (and here). The SUnit Benchmarks and SUnit Based Validation extensions are described at length in the mentoring course book (you can also get the book at Amazon and Powell's). SUnit Based Validation and its multitude of applications are also discussed in this paper and this Smalltalk Solutions 2008 presentation (mirror here) by Leandro Caniglia.

You can get the latest version of Assessments from the public Store repository. The bundle name is Assessments. As soon as I am done with the Fundamentals book, I will add a few things I've wanted in Assessments for a while. See here for the to do list.


Anonymous said...

Cool. Has Assessments been ported to squeak?

Andres said...

No, I developed it in VisualWorks. However, I'd be happy to assist in the port. Right now, I think the best thing I can do is to document design decisions behind Assessments in the Fundamentals books.