Eric Lefevre-Ardant on Java & Agile

September 22, 2009

Faster tests, at CITCON Paris 2009

Filed under: citcon, test — Eric Lefevre-Ardant @ 9:11 am

"Going nowhere fast"

“Going nowhere fast” by Nathan

The session on Faster Tests (led by David) was interesting, at least to the extend that it was quite clear that we are not doing too bad indeed (Douglas Squirrel from youDevise is another one that seems to be quite cerebral about tests and builds).

Faster tests Faster tests

By looking that the various options discussed to get tests faster, I think it’s fair to say that the only way to really speed up tests is by compromising their integrity, at least to a level. In a way, to make tests faster, you’ve got to face reality and move away from their ideal abstraction (very reminiscent of Joel Spolsky’s Law of Leaky Abstractions). The only question is: how confident are you that those (slightly compromised) tests actually test something useful?

This leads to the conclusion that we only keep long integration tests because it is difficult for us to really understand what’s going on. If we did have an excellent understanding, we would have unit tests instead. And, interestingly, as we progress in our project, we find ways to convert integration tests into unit tests. In other words, we better understand what’s going on.

Also, check out my notes on the session on Mock Objects.

June 11, 2009

[Agile 2009] Hudson-related presentations

Filed under: hudson — Eric Lefevre-Ardant @ 1:42 pm

Going to Agile 2009? Cannot get enough Hudson? I have put together a list of sessions at the conference that will explicitly mention the best CI server eveeeer ;-):

OK, I do prefer Hudson (I am a contributor, after all). But I also watch the competition… err, I mean, like the other tools ;-) Here are other presentations I could find that mention competitors to Hudson:

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.

January 2, 2009

Fixed display errors in French translation to Hudson

Filed under: hudson — Eric Lefevre-Ardant @ 3:04 pm

I think I have finally fixed (most) errors in the display of the French translation in Hudson. 3 different people reported them to me, which is a sign that Hudson enjoys a strong following in France (I also keep stumbling on French Hudson fans in conferences and my colleague Eric Le Merdy has just released a new Hudson plugin for Nabaztag).

The root of the problem is that I incorrectly thought that properties should be encoded in UTF-8 (in fact, only help pages in HTML should be). In practice, properties files should stay in classic ISO 8859-1.

I didn’t keep trace of which files I had incorrectly converted to UTF-8 and I don’t know of a tool that could check that for me (if you know of one, do let me know). So there is still a chance that some files remain in the incorrect format. If you find any, please create a bug report.

The fix should be available with the next release of Hudson, v.1.269, which should be a matter of days, according to history. My progress on the French translation are listed on the Hudson wiki.

Apologies to all that were inconvenienced by this bug.

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.

November 9, 2008

CITCON Amsterdam Continuous Integration Cage Fight on YouTube

Filed under: citcon, continuous integration, hudson — Eric Lefevre-Ardant @ 10:45 pm

Julian has just posted on YouTube videos he took during the CI Showdown at CITCON Amsterdam last October. Sound quality is not very good, so make sure you are in a quiet environment.

November 4, 2008

Hudson can now update itself

Filed under: hudson — Eric Lefevre-Ardant @ 10:01 am

Finally! I have been waiting for this for a while. From v1.259, Hudson is now able to update itself automatically (as long as you have installed Hudson as a Windows Service — granted, this might not be the general case).

Another enhancement in v1.259 is that a Hudson distribution can be bundled with plugins. Hudson will extract them properly at first run (which it didn’t do before). Cool, too.

October 20, 2008

Valtech Days are tomorrow!

Filed under: conferences, hudson, openspace, valtech — Eric Lefevre-Ardant @ 10:44 am

Valtech Days are starting tomorrow! We are all very excited.

I will be presenting 3 things:

  • Retrospectives: the key to continuous improvement, together with Laurent Bossavit
  • A 15-mins demonstration of Hudson
  • Introduction to the Open Space part of the conference
If you will be attending this conference, please come and say hi!

October 5, 2008

Back from CITCON Europe Amsterdam 2008

Filed under: citcon, hudson — Eric Lefevre-Ardant @ 7:03 pm

Central train stationI came back this morning from the conference, my third time after Brussels in 07 and London in 06. It was great as usual. If you haven’t been to an Open Space conference, know that you are seriously missing out on something.

There are quite a few things to take away

  • there is a surprisingly large number of CI tools, especially commercial; we had a demo of 7; CruiseControl by Paul Julius, build-o-matic by Ivan Moore, Hudson by yours truly, JetBrains TeamCity by Pavel Sher & Yegor Yarko, Rational BuildForge by Lieuwe, Zutubi Pulse2 by Jason Sankey, ThoughtWorks Cruise by Chris Read. Many others were not represented. I don’t quite understand why the market is so fragmented.
  • CI tools get less interest than before; there were still a few sessions on CI (CI Tools Showdown, Future of CI…) but fewer than usual. Remember that CI is still the main reason why people come to this conference. Instead, more discussions about Agile in general, and on automated functional testing in particular
  • Chris Read from ThoughtWorks wants to push for Open CI, an effort to standardize the storage format of CI tools, so that they can get integrated more easily with other (non-CI) tools, such as Trac, Mingle, etc.

Coding Dojo with Legacy Code

Some advanced features that seemed interesting:

  • personal builds (Pulse & TeamCity)
  • pipelines (Cruise); I think someone mentioned working on such things in the past, though I cannot find traces of it right now.
  • build templates (Pulse); you define things such as a JDK configuration, SVN connection in a template, and you optionally override them in actual jobs that inherit from them. Some (French) people came to me after the conference to explicitely request this on Hudson! I think Hudson is big in France.
  • build steps parallelized (BuildForge, Cruise, others?); in a complex job, you can mark some consecutive steps (say, integration tests and acceptance tests) and get them to run in parallel instead
  • real time display of the number of tests passing/failing (TeamCity)
  • find out exactly who broke the build (build-o-matic)

Interestingly, most commercial tools have a free version (limited to 1 or 2 machines) and charge by the number of slaves (I didn’t realized that slaves were such in demand). Costs are around 10,000USD / year for 10 slaves.

For more on the conference, check out:

Bar at the Marriott HotelThe next CITCON will be in Minneapolis/St Paul on April 17 & 18. Then, Brisbane in June. And CITCON Europe 09 is still TBD.

Oh, and Steve Freeman coined “Scrum is the new RUP”. I need a t-shirt with that.

Updates (06/10/08): it is Lieuwe, not Louis, who demoed BuildForge. Cleared up that Cruise is the only one doing pipelines and that it supports //ized steps.

September 18, 2008

My contributions to Hudson got approved for GlassFish Award Program

Filed under: hudson, java — Eric Lefevre-Ardant @ 3:41 pm

My Fit plugin for Hudson and the translation into French got approved for the GAP program. This means I am going to receive money from Sun! I am going to be rich, rich, rich!

Fancy signageErr… not quite. Once the 30% tax is taken away by the US government (I probably qualify to get it reduced, but sorting out the paperwork is just too cumbersome), plus some possible tax by the French government, plus conversion into the I’m-feeling-high-these-days euros, I should end up with barely enough for a meal for two in Paris.

Oh well, who I am to complain? I would probably have done the work without any money anyway.

Update (09/04/09): fixed dead URL for the translation

September 11, 2008

Everything is vague to a degree you do not realise till you have tried to make it precise

Filed under: books, tdr, test — Eric Lefevre-Ardant @ 9:38 am

I am currently reviewing the first draft of Gojko Adzic’s book Agile Acceptance Testing (I am still at the beginning, but I like it so far). He has a citation from Bertrand Arthur Russell’s Philosophy of Logical Atomism that is just too good not to pass around:

Everything is vague to a degree you do not realise till you have tried to make it precise

With this, I leave you to meditate. ;-)

Older Posts »

Powered by WordPress