Warning: ob_start(): non-static method wpGoogleAnalytics::get_links() should not be called statically in /home/justinedelson/justinedelson.com/blog/wp-content/plugins/wp-google-analytics/wp-google-analytics.php on line 259
Cheesy Title » 2008 » June

Cheesy Title

Archive for June, 2008

JRuby Cookbook available for Pre-Order

Wednesday, June 4th, 2008

In case you didn’t notice the sidebar links, Henry Liu and I are wrapping up a JRuby Cookbook for O’Reilly and it’s up on Amazon for pre-order

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.