Using Jenkins with GHUnit

Jenkins ( is a continuous integration server that has a broad set of support and plugins, and is easy to set up. You can use Jenkins 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 Jenkins with GHUnit.

  • Follow the instructions to set up a Makefile for your GHUnit project.

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

  • Go to Manage Jenkins -> 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 (

  • 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).

  • Under Build, enter the following command:

      make clean && WRITE_JUNIT_XML=YES JUNIT_XML_DIR=tmp/test-results make test
  • 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.