18.7. Hudson integration

18.7.1. Obtaining the Hudson Plugin
18.7.2. Installing the Hudson Plugin
18.7.3. Example: How to use the Squish Hudson Plugin

Hudson monitors the executions of repeated jobs, such as building a software project or jobs run by cron. (For more about Hudson see hudson.dev.java.net.)

Using the Hudson plugin described in this section, it is possible to run Squish tests as Hudson jobs.

18.7.1. Obtaining the Hudson Plugin

The Hudson plugin can be downloaded using the following URL: www.froglogic.com/download/squish-hudson-plugin_latest.hpi.

18.7.2. Installing the Hudson Plugin

To install the plugin, simply move or copy the .hpi file into HUDSON_HOME/plugins where HUDSON_HOME is Hudson's home directory. Once the .hpi file is in the right place it can be enabled simply by restarting Hudson. After the restart, there should be an entry for the Squish Hudson plugin in the Hudson plugin manager.

The Hudson Plugin Manager.

After checking that the Squish Hudson integration plugin is correctly loaded, the next step is to add Squish's installation path to Hudson's global system configuration and to decide if the building should fail if a Squish verification fails. Usually the Squish installation path will be set to Default installation path but if you're using more than one Squish installation the Advanced configuration will be appropriate. Each entry must consist of a key pointing to an absolute Squish path e.g. qt462/squishPath=C:\SquishQt462. The key (qt462) can be referenced inside the job configuration which is explained next.

Hudson's Global Configuration.

18.7.3. Example: How to use the Squish Hudson Plugin

To run Squish tests in the Hudson build process we must adapt the job configuration to include Squish. Here we will use the address book example that is shipped with Squish.

The only thing we must do is to add a new build step which we'll call Squish, to the job configuration, and to set up the test suite and the test cases which we want carried out. The configuration key points to the Squish installation path. If set to Default or left blank the Default installation path inside the Hudson system configuration will be used; otherwise the key inside Advanced path configuration will be used. Additionally a host and port could be specified to use an already running squishserver. In the screenshot we have added two build steps, both using the same test suite, but with different test cases.

Hudson Job Configuration.

After applying the new build step we can run the job. When the run has finished there is a link on the summary page to the Squish test results.

The Hudson Build Summary.
The Hudson Build Summary.

The Squish test results appear in an HTML file:

Hudson Squish Results.