Sumatra: Javascript testing framework in Groovy

Post by Scott Vlaminck

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).

About Scott Vlaminck

believes software development is more about people than technology; believes in agile processes; software developer, engineer, designer, architect, or whatever they're calling us these days; enjoys discussing software design; working on a program to write other programs (but it hasn't written itself yet).
This entry was posted in Software Development. Bookmark the permalink.

You may also like:

2 Responses to Sumatra: Javascript testing framework in Groovy

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

  2. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>