I’ve been playing with JRuby lately. One of the big reasons we picked Ruby for our test framework instead of JRuby (even though we’re testing a Java application) was Watir, and the fact that JRuby didn’t support it (or it didn’t support JRuby, depending on how you look at it). I’ve recently been exposed to Celerity (http://celerity.rubyforge.org/). It looks pretty cool. Here are some features of it:
- It’s written for JRuby, so you have access to Java and any Java classes you might need to interface with
- The API is based on Watir, so it should be pretty familiar to test developers used to working in Watir
- It lays on top of Java’s HTMLUnit, so it works a little differently than Watir. Instead of driving an actual browser (like IE), it communicates with a web server via HTTP – so it basically emulates a browser.
So far, I like it alot. However, one big issue I’ve been having (which is actually an issue with HTMLUnit) is that in a browser, if I go to a site that uses SSL I get a warning page and I can tell it to ignore certificate issues. However with HTMLUnit/Celerity, you can’t do that. It expects SSL sites to have a certificate. This causes Java exceptions if you don’t have one (like on a testing site).
I’m still playing with it so maybe there is a workaround. I hope so – I could see Celerity really filling a niche in the testing world.
HtmlUnit provides the method WebClient.setUseInsecureSSL(boolean) for this; not sure how (or if) Celerity exposes this.
ReplyDelete