Cheesy Title

Hudson Twitter Plugin 0.2 Released

Thursday, July 3rd, 2008

I released a new version of the Twitter plugin for Hudson today. You can see the details at http://hudson.gotdns.com/wiki/display/HUDSON/Twitter+Plugin.

This is the third plugin I’ve written in whole or part and I continue to be extremely impressed with Hudson’s extensibility. I’ve got some other ideas, but I think I’m going to put those on hold and instead concentrate on building out a library for unit testing plugins as I seem to be running into the same issues over and over again.

Using Xvnc within Hudson to run FlexUnit tests

Wednesday, June 4th, 2008

Like most people unit testing Flex applications with FlexUnit in a Continuous Integration environment, I’ve based our setup on Peter Martin’s blog post from January 2007. In it, he describes one of the core challenges of this type of configuration: the fact that the CI server is likely headless. Martin’s solution is to use Xvfb. And this works fine.

But Hudson can do better because someone (Kohsuke, I assume) wrote a plugin for Xvnc. Simply install the plugin and check the checkbox in the job configuration screen:

Hudson will then automatically start up a Xvnc session and set the DISPLAY environment variable to the appropriate value and then shut down the session when the build is complete. One advantage this has over the Xvfb method is that if you have multiple Flex projects building simultaneously, each build has its own X session. While this has yet to be an issue for our projects, it seems like a good idea. The architecture of FlexUnit actually makes simultaneous builds a bit tricky. In another post, I’ll cover how Hudson can solve this problem too.

A word of warning:
Before using this plugin, you obviously have to have Xvnc installed. What’s less obvious (although sensible) is that you must also set a password. You do this by running:
$ vncpassword
This has to be done as the same user Hudson runs as.

FlexUnit reports in Hudson

Sunday, June 1st, 2008

As a follow-up to my post about using the FlexUnit results produced by the flex-mojos Maven plugin to produce a unit test report, I wanted to point out that this same technique can be used within the Hudson continuous integration server.

Here’s what the config looks like:

(Note that we’re also using Hudson’s JavaDoc support to publish the produced ASDoc).

This gives you all the nice Hudson unit testing support like graphs of tests per build:

UPDATE – With the Flex Mojos 1.0 release, the output directory for FlexUnit tests has changed. It’s now surefire-reports, so the Test report XMLs value should be **/target/surefire-reports/*.xml.