Eric Lefevre-Ardant on Java & Agile

March 6, 2009

Is Fit Dead? A debate on Twitter

Filed under: fit — Eric Lefevre-Ardant @ 5:29 pm

Influential members of the Agile community recently discussed the current state and history of Fit (the original thing, not Fitnesse or other Fit-inspired tools). The conversation took place on Twitter mostly on Tuesday, March 3rd and Wednesday, March 4th. Here is a transcript.

It was kicked off by an interview of Ward Cunningham and James Shore on Hanselminutes where Ward & James were asked whether Fit was dead.

Bob Martin first reacted on Twitter by pointing out that, at any rate, “FitNesse is thriving”, along with Slim, a new system that can be used by Fitnesse as an engine to run the test tables.

Michael Feathers replied that, in his view, Fit was more appropriate as a seed for other works: “Take it, grow it locally, and never commit back.” This seems confirmed by James Shore, a former leader of the Fit project (and a successor to Ward in that role): “Fit core was intentionally resistant to change [...] from an organizational perspective”

Interestingly, James believes that both Fit and Fitnesse have “similar flaws, which could be solved by another approach”:

  • Fit flaw #1: maintenance. HTML is hard to maintain and refactor.”
  • Fit flaw #2: Customers. Customers don’t generate the documents, and that was the whole idea.”
  • Fit flaw #3: Programmers. Fit loves domain models and Whole Value. Most programmers don’t. Impedance mismatch.”

This last point is actually seen as a benefit by J.B. Rainberger: “Similar to JUnit, Fit puts positive pressure on programmers. [That said] TDD informs design, but many use JUnit for testing. Fit informs feature design, but many use Fit for testing.” James agrees: “Fit drives the design of the domain layer just as TDD drives separation of concerns.”

JB & James both note that, regardless of the tool itself, they “continue to succeed collaborating with customers with Fit’s table format”, typically by “collaborating with examples on a whiteboard”.

Possibly, the biggest shortcoming (as stated by James & Ward during the interview, but also in twitter by Brian Marick: “I can’t offhand think of any product owner who wrote tests in any format”) is that the assumption that business people would write the tables was flawed. A view not shared by Keith Braithwaite “I’ve had actual users write tests in tables in excel with success”. JB, for one, prefers “Customers help write docs”, reformulated by Elisabeth Hendrickson as “Business stakeholders & implementation team collaborate on articulating expectations.”

Finally, several people including Willem van den Ende pointed to BDD and especially to Cucumber as a better implementation of the same ideas “Cucumber given/when/then steps flow naturally for me, FIT- style tables are optional, I add them later if needed.”

For more details see the following links:

February 16, 2009

Fitnesse now supports versioning to SCMs!

Filed under: fit — Eric Lefevre-Ardant @ 10:29 pm

I really like how Fitnesse is doing these days (I even subscribed to the mailing list, which I had not considered last year, for example). Bob Martin is adding features every few weeks. It is great!

In the release he did a couple of days ago, he added 2 interesting things:

  • one is a format tool that helps giving a more readable view of your tables, in editing mode; unfortunately, your edit panel must be using a fixed-size font (which it is not the case by default on my system)
  • the most interesting addition, though, is the support of SCM tools to store wiki pages

There are two ways to configure a SCM tool.

The first is to specify it on the command line:

  java -DCM_SYSTEM=package.to.AParticularCmSystemIntegrationClass -jar fitnesse.jar

The second is to specify in a high-level page on your hierarchy of pages:

  !define CM_SYSTEM {com.project.fitnesse.OurSvnSystem me/my_password /cm/myRespository}

This one is interesting, because it allows you to have different configurations for different hierarchies of pages (typically one for each different projects, or even for different versions of the same project).

The bad news, though, is that the CM System Integration class in question is not provided by default, though I’m sure that in time there will be all sorts of appropriate integration classes provided with Fitnesse. But that’s not the case so far (except for an example made to connect to Git — not sure how generic it is). That said, it does seem quite easy to implement that class (you basically need to implement calls to the command line in Java).

You might want to download the Fitnesse release and check out the FitNesse.UserGuide.SourceCodeControl page. As often with Fitnesse, the website does not have the latest details.

December 11, 2008

Bob Martin on Hudson

Filed under: fit, hudson — Eric Lefevre-Ardant @ 10:37 pm

Yep, you heard it here first: Uncle Bob loves Hudson!

Not content with the videos on Slim, he has just produced another one showing how to do basic staff with Hudson. And by the sound of his voice, he is sold!

Inteerstingly, he compares the simple startup process of Hudson to the one in Fitnesse: just download and run.

Update (14/12/08): Uncle Bob has actually put online his Hudson install

November 29, 2008

Data types in Slim

Filed under: fit, tdr — Eric Lefevre-Ardant @ 1:28 am

After an initial introduction video, one on comparaison operators, Bob Martin has now a video on Data Types in Slim, his Fit replacement in Fitnesse.

Data types in Slim are simple. They can only be Strings and Lists, though it is entirely possible for fixtures to actually get integers.

A list looks like this:

[1, 2, 0.5]

Note the brackets. Also, note the space between the comas and the following value. This is important, as the comparaison will actually be made between the exact string specified in the table, and the String representation of the List returned by the fixture. Hence, the format in toString() is important.

November 22, 2008

Comparaison operators in Slim for Fitnesse

Filed under: fit, tdr — Eric Lefevre-Ardant @ 1:50 pm

Now that the release of Slim is done, Bob Martin is spending time producing tutorial videos. The new one is about comparaisons in Slim.

There are two majors things to learn in it:

  • approximate equals
  • ranges

The ~= sign means “approximately equals to”, and depends on the number of decimals; for example,

~=1.3

in a cell will work for any value between 1.2 and 1.4.

A range allows Slim to accept results between boundaries. For example, put something like

1<_<8

in a cell and all values between 1 and 8 will be considered valid. This is something that some versions of Fit could do, but not all. With Slim, all versions of Slim will support this (since it will be evaluated on the Fitnesse side).

Last thing: Fitnesse contains a rather powerful expression evaluator that is not specific to Slim or Fit.
For example:

!define TIMES {1000}
|${=5*${TIMES}=}|

You can combine this construct with the range, and have something like this in your cell:

${=5*${TIMES}=}<_<${=6*${TIMES}=}

which will appear as

5000<_<6000

when viewing your wiki page.

Finally, you might want to watch out for the coming minor release of Fitnesse.

November 19, 2008

Bob Martin releases Fitnesse with Slim

Filed under: fit, tdr — Eric Lefevre-Ardant @ 2:41 pm

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.

June 27, 2008

RichNesse, a WYSIWYG editor for FitNesse

Filed under: fit, test — Eric Lefevre-Ardant @ 12:25 pm

After a pointer by Jérôme Piétri, a colleague of mine at Valtech, I have had a look at RichNesse, a WYSIWYG interface for editing pages under Fitnesse. It is based on FCKEditor. All in all, I am impressed.
(more…)

March 11, 2008

Using Fitnesse with DoFixture From FitLibrary

Filed under: fit — Eric Lefevre-Ardant @ 11:58 am

I like FitLibrary and I like Fitnesse. However, there is really one thing to keep in mind when migrating from plain old ActionFixtures under Fitnesse to DoFixtures.

(more…)

Powered by WordPress