10
2007
Getting Groovy with Hudson and Cobertura
Gave a talk last night at our local Canberra JUG on using Hudson for continuous integration. (Brief slides available, but it was mostly a “demo” style talk… so not much to show)
But to spice it up a little, I used my latest little Groovy project as the demo. I was reading in Groovy in Action about the support Groovy Unit tests have for both IDE integration and coverage tools, so I thought I’d throw that into the mix. Using JUnit from Eclipse works just great…
I did have some problems getting my tests running from Ant, getting an error like:
groovyc doesn't support the "srcdir" attribute
Which turns out to mean that I’d defined my groovyc task incorrectly. It needed to be:
<taskdef name="groovyc"
classname="org.codehaus.groovy.ant.Groovyc"
classpathref="useful.jars"/>
One thing I have been wanting to try out is Cobertura support for Groovy. Turns out to be a snack. The only gotcha is that you must set fork="true" on your JUnit task. If you don’t, all your coverage reports will appear blank (ie with 0% coverage).
If you haven’t tinkered with Hudson before… it’s definitely time. Everything is configured via the browser, no XML to tinker with, and a it has a great Ajaxy UI.
I wasn’t aware that there is now also an Eclipse plugin for Hudson which can poll your build machine every so often and give you an update on the status of things. Very funky.
It was a really fun talk, and people were pretty impressed with how far Hudson has come in such a short time. Interestingly, only a third of the group was doing CI right now, so it was pretty cool to be able to demo to them the “lunch-time-ability” of getting Hudson installed and configured.
Big props to the Hudson guys… and the Cobertura guys… and, of course, the Groovy guys! Very cool stuff!
7 Comments + Add Comment
Leave a comment
Glen Smith
Archives
- January 2012
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- April 2011
- March 2011
- January 2011
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- October 2003
- September 2003

An article by Glen





Glen, neat stuff. Have you seen the upcoming CI/testing conference in July in Syndey:
http://www.citconf.com/sydney2007/
I am hoping to be there.
Paul.
Looks like a great conference, Paul. Look forward to tracking the conference wiki to see what interesting developments comes out of the openspace format!
Small world! I decided to use your CSV library in my Hudson plot plugin ( https://hudson.dev.java.net/issues/show_bug.cgi?id=219 ), then I came across your Hudson blog entry.
Great stuff. Love the Open Source ecosystem!
Hi Glen,
Have you tried to use Hudson with a Grails app? If just seen that there is a Gant Plugin, that could work for integration: http://hudson.gotdns.com/wiki/display/HUDSON/Gant+Plugin
I know you from some posts about Grails
Cheers
Mark
No Mark, I haven’t. But there’s rumours that a future Grails release will have its own CI system build it!
I’ve heard a few guys on the list have CruiseControl working, but I haven’t heard of any Hudson examples… yet…
We’ve got Hudson working with our Grails build, not hard to set up, works great. Runs the same ant target that we run in IntelliJ.