The beginning

Back around 2001, Mike Bowler was working with an eXtreme Programming (XP) team at one of his clients. The team was building a web application and wanted to write automated unit and acceptance tests but at that time, they didn't have the browser automation tools that are available today. The one tool that could be found, only simulated the HTTP protocol and not the interaction of the page.

So Mike got annoyed with the lack of tooling and created HtmlUnit to fill that gap. Starting with just simple form handling and page interaction, HtmlUnit grew to support JavaScript so that it could truly simulate what the page would do in a real browser. While developement started off slow, with just one person working on it, HtmlUnit has grown to have an engaged community. Its current success is due to the huge contributions from people we've never even met in person.

Mike Bowler - What I recall...

It was about 2001 and I was leading an XP team at a client.
We needed to have some way to write automated tests for the UI and the tools that were available at the time were unsatisfactory for our needs.

  • HttpUnit worked but it modelled the wire transfer protocol rather than the page and those tests just felt awkward to write.
  • I believe that an early version of Watir was already available at that time but it only supported IE and there were no indications that it would become cross platform, as actually happened.

So I modelled out how I wanted to write my tests by interacting with fields on the page and validating behaviour in that way and I created the first version of HtmlUnit to support that.

For probably the first six months, there was no javascript support. This was purely form submission and simple interaction. This was because the notion of supporting the entirety of Javascript was daunting, and I just didn't have the time for that - this was all being built in my spare time.

Then I discovered the Rhino engine, that appeared to do all the hard work for me, and I started to integrate that. I quickly discovered that while Rhino did an amazing job of covering the language itself, it was still far more work than I'd anticipated to integrate it into a simulated browser.

It was slow going and initially, it only supported the parts of javascript that I needed but then after about a year of development, I started to get other people submitting patches, and development picked up speed.

As the development community grew around HtmlUnit, it really started to mature as a product.

After a number of years, I stepped away to focus on other things, knowing that the product was in good hands and would continue to improve.