You are probably familiar with Fitnesse, a wiki site that wraps Fit. It is basically an environment that helps attaching tests to specifications. Some call this a Test-Driven Requirements (TDR) tool. It has been originally written by Robert C Martin (aka Uncle Bob), Micah Martin and Michael Feathers.
Well, Uncle Bob is coming back with Slim, an extension of Fitnesse he has been working on since August 2008, as his followers on Twitter know. It has been released in the latest version of Fitnesse a few days ago.
Simply put, Slim (Simple List Invocation Method) is an alternative to Fit, quite simpler to implement and to use, and integrated with Fitnesse.
The big thing with Slim, for us mere users, is that it calls POJOs. No need to inherit from Fit-specific classes anymore! (something that GreenPepper has had for a long time) You will just have to implement some methods with particular names, depending on the type of fixture you use.
The fixtures that are available are familiar ones:
- Decision Table, the equivalent of Column Fixture, with input columns and output columns
- Query Table, the equivalent of Row Fixture; interestingly, its method query() now returns a List of Lists of Lists (!) instead of an Object table
- Script Table, the equivalent of Do Fixture in FitLibrary; it also shares many caracteristics with ActionFixture
- finally, Table Table is the way for you to write any arbitrary fixture
Other enhancements include:
- variables in fixtures can stay private; no need for them to be public anymore; setter methods are required instead. Not a big deal in my view, but something that beginners were often complaining about
- error messages are clearer in Fitnesse, typically when classes or methods cannot be found in the fixtures
- as a side effect of an evolution of Fitnesse made necessary by Slim, it is now possible to run tests in differents JVMs
- Slim is much simpler to implement than Fit is; this is supposed to make ports of it to other languages much easier, more stable, and more consistent (some implementations of Fit do not have the exact same features as others)
- it should also be possible to write tests without tables (with updates of Slim), which was very difficult with Fit, because of all these implementations; I want to see things like the plain text tests in TextTest !
Convinced? Then the next step for you is to look at the tutorial video Bob Martin did yesterday.
Me, I think this is a great enhancement, and one of the biggest news in the TDR Tools world this year. With Bob Martin’s influence, there is no doubt it will pick up steam quickly.