Friday, January 01, 2010

SUnit improvements

Lately, SUnit has been picking up interesting enhancements for consideration:

  • classes are referenced via accessors, so you can refine by subclassing.
  • a new abstract class called TestAsserter has appeared (at least tentatively).
  • exception handling now uses polymorphic handlers that double dispatch on the exception.
These changes are very positive. In fact, they were the basis of my refactored SUnit which I ended up calling SUnit VM. I had implemented SUnit Based Validation and SUnit Benchmarks on top of SUnit VM precisely because I had that kind of flexibility available in SUnit VM. But now that SUnit is improving, SUnit VM becomes less valuable because vanilla SUnit is better. Consequently, I hope to obsolete SUnit VM and reimplement SUnit Based Validation and SUnit Benchmarks on top of SUnit. These are very good news, and I am happy with this progress. Hopefully these improvements will be integrated soon.

If you'd like to know more about SUnit Based Validation and SUnit Benchmarks, as well as some of the rationale behind the original changes in SUnit VM that are now making it into SUnit, check out chapter 4 of the mentoring course book.

3 comments:

akuhn said...

Good to hear that SUnit is making progress. Where can I find you fork for download?

I had been working on SUnit for Pharo over X-mas. You can find my fork on squeaksource under the akuhn project. So far its mainly a clean up, but I already found time to add some new features. A new expectation matcher DSL `stack empty should be true` etc, a new class factory DSL, and test ordering such that fast tests are run first.

cheers,
AA

Andrés said...

The fork is available in the public Store repository, bundle name SUnit Very Much. There's also a bundle called SUnit Extensions, which contains SUnit Based Validation and SUnit Benchmarks.

Note, however, that at some point I realized SUnit's simplicity sometimes detracts from its flexibility. Consequently, I implemented an optional, backwards compatible replacement called Assessments. It's also available from the public Store repository, bundle name Assessments. I wrote about Assessments in the first volume of the fundamentals book.

Andres.

akuhn said...

Cool! I'll take a look at it.