This series will demonstrate how to set up a continuous integration (CI) environment for ColdFusion projects using Hudson CI and MXUnit. We’ll cover Hudson setup, MXUnit test runs and JUnit XML output, and a few notification mechanisms (email, IM).
This will cover the super-duper simple way to run Hudson, which you'd do for testing this stuff out. DO NOT RUN YOUR REAL CONTINUOUS INTEGRATION ENVIRONMENT IN THIS MANNER. If you already have Tomcat set up, then you know how to install war files so follow that procedure instead (i.e. drop the war where you put your war files, or use the admin to deploy the war. It's that simple)
- Download the Hudson war file and put it somewhere
- Open a command line and navigate to the war file location
- type “java –jar hudson.war”
- This will launch Hudson. You can navigate to http://localhost:8080 and from there, you’re ready to start
Pulling your project from Subversion (SVN)
- Click "create a new job"
- Give your job a name, and then select Freestyle Software Project
- Under Source Code Management, select SVN, and then plug in your project’s SVN location, eg http://svn.myproject/whatever/trunk
- From here, you can click “Save” and then perform a build by clicking “Build”. This will check out your code into the Hudson workspace for your project
But this code isn’t where I need the code to be! Good point. As I get started with this, I’m going to just keep doing it this way until I figure out a better approach. At least where I work, we have DEV servers where code is automatically updated from SVN anyways, and our unit tests all run against the DEV server. I’m not setting up a CI environment in order to set up yet another server; instead, I’m setting it up so that I can get better reporting and notifications while still executing the same tests against the same code.
See how easy that was? Next up, configuring ANT, running your tests, and recording results