Download →

What is Celerity?

Celerity is a JRuby wrapper around HtmlUnit – a headless Java browser with JavaScript support. It provides a simple API for programmatic navigation through web applications. Celerity aims at being API compatible with Watir.



Background is a top provider of online classifieds in Europe. Consequently automated functional testing is an essential part of our quality assurance effort. As of spring 2008 our Watir test suite, consisting of 340 test cases (which only covers part of our application), completes in 3 hours. Obviously, not optimal for an agile development environment.

We need a faster alternative. At the same time, we enjoy working with Ruby and Watir's API. By providing this API on top of HtmlUnit, we hope to significantly speed up test suite execution, while avoiding a rewrite of our existing test suite. Early benchmarks are available.

Installing Celerity

$ jruby -S gem install celerity

Code example

require "rubygems"
require "celerity"

browser =
browser.text_field(:name, 'q').value = 'Celerity'
browser.button(:name, 'btnG').click

puts "yay" if browser.text.include? ''

For more examples and help, check our wiki.

How to submit patches

Read the 8 steps for fixing other people's code. The repository is hosted at GitHub. Failing specs for issues/features are most welcome!


Celerity is licensed under the GPLv3 license.


Comments are welcome. You can reach us through our mailing lists, our forum, or our individual email addresses below.