Oudated knowledge of “experts”: the example of HttpUnit

If you look at the download statistics of HtmlUnit and HttpUnit at Sourceforge (here for HtmlUnit and here for HttpUnit), you’ll see that HttpUnit still has more downloads than HtmlUnit. This is quite surprising when you have some knowledge of both libraries and particularly of the fact that HttpUnit is deeply asleep since so many years (the recent 1.7 release doesn’t really change the deal).

In his blog post “HtmlUnit vs HttpUnit“, Daniel Gredler wrote “HttpUnit is to the web app testing world what Struts is to the web app framework world: there are many “better” options out there, but it just won’t go away!“. I totally agree but it is interesting to examine the reasons why it doesn’t go away. I believe that one element of the answer is that many “experts” have outdated knowledge in this domain and still talk about HttpUnit.

Some examples:

  • Rod Johnson

In “System Integration Testing Using Spring” at the The Spring Experience conference, Rod talked about HttpUnit but not about HtmlUnit.

  • JSFUnit

The JBoss project JSFUnit contains HttpUnit not HtmlUnit.

Nevertheless it seems that in this case the mistake has been identified as a feature request “Investigate replacing HttpUnit with HtmlUnit” already exists.

  • Recent books

Different recent books mention HttpUnit but not HtmlUnit, like for instance Java Power Tools (by John Ferguson Smart), Test Driven, Practical TDD and Acceptance TDD for Java Developers (by Lasse Koskela), or Ant in Action, 2nd Edition (by Steve Loughran and Erik Hatcher). In this latest case, rather than HtmlUnit, they should probably have written about WebTest as it is probably the tool – web testing or not – that makes the most intensive usage of Ant.

Why?

Why did all these famous developers talk / write about HttpUnit? My guess is simply that functional tests of web applications are not their favorite field of expertise and therefore that they didn’t update their knowledge in this area since a – too – long time.

The consequences

I see two consequences. First it gives a bad impression on the whole presented content: no matter how good it may be, when you detect outdated areas, you start to question the rest. Second, it influences newcomers that have no idea of the domain and this can be a good explaination for HttpUnit surprising high download numbers.

2 Comments

  1. Doru said,

    June 4, 2008 at 7:11 am

    Hi Marc,

    We had the same debate in our dev team 1 year ago and I’m glad that we settled quickly to use HtmlUnit over HttpUnit.
    Until now HtmlUnit was even more active that we have thought at the beginning and we benefit from the improvements you and the HtmlUnit team brought in the last year.
    Keep up the good work and enjoy your holiday.

    Kind Regards,
    Doru

  2. GeorgeBush said,

    February 21, 2009 at 8:32 pm

    It’s difficult to find examples or books that cover httpunit and even more difficult to find stuff for htmlunit. Generated documentation which only lists classes and methods is woefully inadequate. This is one of the biggest shortcomings of open source software.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: