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.

Advertisements
Posted in Agile, code, OpenSource, SoftwareDev
One comment on “Finding Celerity
  1. JamesD says:

    Thanks for the useful info. It’s so interesting

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

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Archives
Categories
Blog Stats
  • 6,860 hits
%d bloggers like this: