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 » 04

Cheesy Title

Archive for June 4th, 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.