Home > Agile, code, OpenSource, SoftwareDev > Finding Celerity

Finding Celerity

This weekend I wanted to get ahead on one of my tasks at work, which was to write some Watir scripts that would help us do a small load test on a new application we have and the server infrastructure on which it lives. I got the Watir scripts working generically but wanted to make them a bit more dynamic. As I was browsing the Watir site’s documentation I saw a mention of a related project called Celerity. It sounded like Watir without the need to actually invoke the events of a real browser.

I hadn’t used JRuby before, but had always wanted to mess with it. Celerity uses JRuby so I had my excuse. It only took a couple of hours to have a fully functional test case running. I used a ‘load test’ Ruby script I was using with Watir to run concurrent instances of the test case. With a single thread everything was excellent. But even just going to 2 threads caused the process to fail with an OutOfMemoryError. I tried increasing the heap size using the
-J-Xmx###m
option, but it didn’t help. Luckily, my twitter on the subject was replied to by ‘@jarib’ who helpfully pointed out that the error was a PERM GEN issue rather than a plain ol’ heap space issue. The solution was to use
-J-XX:MaxPermSize=256m
as the option. After doing that I could run 7 threads, enough to severely slow down my system, but still work without memory issues.

I’m definitely a fan of Celerity now, and I’d recommend anyone interested in web application testing look into it.

Advertisement
Categories: Agile, code, OpenSource, SoftwareDev
  1. JamesD
    June 11, 2009 at 10:44 am | #1

    Thanks for the useful info. It’s so interesting

  1. No trackbacks yet.

Leave a Reply

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

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

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

Facebook photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.