Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (35 sloc) 2.11 KB

Using Hudson with GHUnit

Hudon is a continuous integration server that has a broad set of support and plugins, and is easy to set up. You can use Hudson to run your GHUnit tests after every checkin, and report the results to your development group in a variety of ways (by email, to Campfire, and so on).

Here's how to set up Hudson with GHUnit.

  1. Follow the instructions in the GHUnit README to set up a Makefile for your GHUnit project.

  2. Download hudson.war from Run it with java -jar hudson.war. It will start up on http://localhost:8080/.

  3. Go to Manage Hudson -> Manage Plugins and install whatever plugins you need for your project. For instance, you might want to install the Git and GitHub plugins if you host your code on GitHub.

  4. Create a new job for your project and click on Configure. Most of the options are self-explanatory or can be figured out with the online help. You probably want to configure Source Code Management, and then under Build Triggers check Poll SCM and add a schedule of * * * * * (which checks your source control system for new changes once a minute).

  5. Under Build, enter the following command:

    make clean && WRITE_JUNIT_XML=YES make test

  6. Under Post-build Actions, check Publish JUnit test result report and enter the following in Test report XMLs:


That's all it takes. Check in a change that breaks one of your tests. Hudson should detect the change, run a build and test, and then report the failure. Fix the test, check in again, and you should see a successful build report.


If your XCode build fails with a set of font-related errors, you may be running Hudson headless (e.g., via an SSH session). Launch Hudson via on the build machine (or otherwise attach a DISPLAY to the session) in order to address this.