small refactr logo
At refactr we believe in the value of connection, the utility of agile processes, and the power of great ideas. We are creating the next generation of software for people who expect more from their web applications.
refactr
« The hosted small business platform | Spending time in nature is good for the brain »


Sumatra: Javascript testing framework in Groovy


About six months ago, Jesse and I were talking about how much Javascript code we had been writing and how it would be nice to have better (or any) test coverage of that code.

I had used Selenium a little bit and I spent a little time writing some jsUnit tests, but what we really wanted was to be able to run the javascript tests along with the other test cases in our Grails project. We figured that with Rhino, there should be no reason that you couldn’t use Groovy to write jUnit tests to test our javascript code.

And so Sumatra* was born. With a little invokeMethod goodness, I wrapped the Rhino api, making it more usable and readable. At the June GUM meeting, I did a little show and tell of some working examples and I finally just got around to creating a project home for it.

Give Sumatra a try and let me know what you think. And if anyone is interested in spending time adding to it and enhancing it, join the project!

* I started calling it RhinoUnit and found that there was already another project by that name. Hamlet suggested Sumatra because of the allusions to both the rhinoceros and Java (via the coffee bean).

This entry was posted by Scott Vlaminck on Monday, November 10th, 2008 at 4:43 pm and is filed under Software Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Further Discussion (2 Responses so far. Add yours)

  1. Graeme Rocher said...
    Neat, so where’s the Grails plugin? ;-)

  2. Scott Vlaminck said...
    Funny you should ask. I have one cobbled together, but it needs a little work before it can be used on a second project. I’ve been hoping to get it finished this week, but that doesn’t seem likely anymore. It’ll be coming soon, though.

Join the Discussion