Hudson

PHP-oriented job or queue manager

I'm looking for a way to manage asynchronous, potentially long-running PHP jobs (ex. feed import and generation). One could start with a simple cron-based system, but this has a few drawbacks :

* Too much 'downtime' if you set the sample interval too long
* Overlapping jobs if jobs don't finish
* No ability to handle events or dependency issues

I've previously used AppWorx (appworx.com) in a large ETL operation. AppWorx is quite sophisticated with a distributed slave architecture, chains, forks and joins. But AppWorx is probably too complex for my needs.

Setting up slave servers for Hudson

If you're running the Hudson continuous integration server, you may want to run/build/test on multiple slave servers.

To do this, log into the Hudson web interface and go to Hudson > nodes. Configure your new slave server by adding the name, description, remote file system root for Hudson (ex. /var/hudson), and the job launch method.

For job launch method, ssh is fine for Linux based systems. Click the 'Advanced' button to enter ssh details (ex. keys).

Now, when you start up the slave, you may see this in your slave ssh log under the Hudson console output :

Categories: 

Running Selenium PHPUnit tests against Firefox in an Ubuntu virtual machine

As part of my Hudson CI server, I'm trying to run Selenium-based PHPUnit tests with each build. The build machine is an virtual machine (VirtualBox) running Ubuntu desktop.

Initially, my tests weren't running thru Hudson and the associated build.xml file. This wasn't surprising since I had forgotten to start the Selenium RC server.

Using the Hudson Continuous Integration (CI) tool

I recently started writing some automated Selenium (Se) tests . I wrote a few tests, and Se seems to work well. But after writing a few tests, I found I needed an easy way to run, report, and track test results.

This lead me to Hudson, a Continuous Integration (CI) tool.

Hudson builds a given project and then does a number of useful things :

  • Automatically run unit tests and provide coverage reports
  • Show style, syntax, and complexity results

Adding PHP CodeSniffer to your Hudson Phing Continuous Integration Process

In a previous post, I described how to setup Hudson with Phing and PHPUnit for a simple PHP build process.

Adding PHP CodeSniffer to Build Results

Now let's expand on this a bit by adding PHP CodeSniffer (PHPCS).

First, assuming you're still working on Ubuntu, install PHPCS :

$ sudo pear install  PHP_CodeSniffer

Add the Checkstyle to Hudson (Manage Hudson => Manage Plugins => Available).

Installing Hudson, Phing, PHPUnit and Git on Ubuntu

In this post, I'm just trying to get the simplest setup. I'll try to post details in a subsequent post.

Here are three posts, in descending order, on this that I found useful :

http://toptopic.wordpress.com/2009/02/26/php-and-hudson/

http://blog.jepamedia.org/2009/10/28/continuous-integration-for-php-with...

http://www.davegardner.me.uk/blog/2009/11/09/continuous-integration-for-...

First, I had to install java :

    $ sudo aptitude install sun-java6-jre  
Subscribe to RSS - Hudson