Archive for May, 2010

Bike Ride For UCLH Leukemia Charity

Today I finished a wonderful sponsored bike around Richmond Park, in aid of UCLH Leukaemia Unit Charity. This charity have been helping my uncle throughout the past 5 years of his treatment for Leukaemia, primarily by supporting his out-patient care and by providing bursaries for the fantastic postgrad nurses who work there.

Edited 27th May: Here are the photos!

The group of riders before the ride

At seven miles long, the ride was short but very pleasant. It weaved it’s way around the perimeter of the park over gravel and for the most part we were riding under the dappled shade of the mighty oak trees. From time to time we spotted the park’s famous deer, and joked that their ancestors must have regularly ended up on King Henry VIII’s dinner table!

I used my android phone to track the route via GPS:

View UCLH Leukaemia Charity Bike Ride in a larger map

For the ride I was joined by a number of UCLH staff members and relatives of current patients. There was even a former patient who had recovered from the chemotherapy received at the UCLH Leukaemia unit. He wanted to express his thanks with his new lease of life the unit had allowed him.

It was an absolutely beautiful day out and it was all for a good cause. Thanks to all who donated via my justgiving page: With their help I have exceeded my donation target.

After the ride, the trinkets were handed out!


My Technology Curriculum

I’ve started this blog is primarily a learning exercise, so here I will lay out a curriculum of topics I intend to study and blog about. This post should also help as a motivational tool and be useful as a To-Do List.

My list of technologies to learn, in chronological order, includes:

There’s a fair amount to learn there, but this is what I’ve currently got on my tech radar and I aim to have some useful knowledge of all of them.



Setting up Continuous Integration with Cruise Control.Net

I recently set up Cruise Control on Vista PC for development purposes and I thought it might be useful to document the process I followed.

If you don’t know what Continuous integration is then I recommend a that you read a brief overview of it by Cruise Control .Net developers

In my implementation there are 3 components to continuous integration system.

Source control (I am using VisualSVN)
Complier (MSBuild.exe, which is part of the .Net Framework)
Nunit, a unit test runner

The process involved is fairly straightforward. First the trunk of the source code is pulled from the repository to the working directory. MSbuild.exe compiles the source code, then the nUnit tests. Finally the tests are run against the complied code. The success or failure of of the tests is output as an xml file and is reported in web dashboard.

I have also installed CCtray, a program that runs in the systray showing the state of the last build. It allows builds to be run manually, as opposed to a on a timed interval . The CC web dashboard shows a wealth of information on the build state and if any Nunit tests have failed.

I achieved this by following instructions on The CCNET homepage which I’ve summarised below.

In my case the editing, building and testing of the code is done on my local machine along with hosting the source control. In a bigger environment your would host these services seperately for performance reasons, but in my scenario this is not an issue.

Having installed from the download page I installed setup.exe. The CCTray.exe will be installed once the server has been setup

Once CC net is installed the server must be started by running the icon on the desktop.

To test if the install was successfully, I pointed my browser to http://localhost/ccnet/ViewFarmReport.aspx

The first hiccup I encountered was a an IIS 7 error:
HTTP Error 500.23 – Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

Which was easily solved after a quick google, I found that the solution was to switch the application to a Classic mode application

The server is controlled via it’s config file, which is found in C:\Program Files\CruiseControl.NET\server\ccnet.config. This file is at the heart if to the entire integration process, and contains the list of actions the server will complete on each build.

Any edits to ccnet.confg will restart the CCnet server.

To complete the first stage of a build, which is to checkout the latest version of the code, I added the source control block to ccnet.config. It which defines where code is within the repository and where it is checked out to. My example is for a SVN but Cruise supports many other source control systems.

<sourcecontrol type="svn">
  <executable>c:\Program Files\VisualSVN Server\bin\svn.exe</executable>

The next step is to add to the config file instructions to build the code that has been checked out.

To do this I used the MSbuild.exe file found in C:\Windows\Microsoft.NET\Framework\v3.5. To save my aching fingers from typing too much, I added the above path to it to the system path.

Within the tags I inserted the block as below

              /noconsolelogger /p:Configuration=Debug /v:diag
           c:\Program Files\
       CruiseControl.NET\server ThoughtWorks.CruiseControl.MsBuild.dll

This builds the code that has been checked out. Note that the workingDirectory values are the same.

I also added another block which complies the nUnit tests. In my case, the trunk directory that was checked out contains both the data classes and Nunit test classes so only one checkout was required.

Now that the code has been complied, the unit tests are to be run. I have added the path to the nunit exes to the system path. The Nunit-console.exe runs the tests and creates an xml file containing the status report of the tests run against the classes.

I added the exec block inside the tags

              C:\Program Files\NUnit 2.5.2\bin\net-2.0

At this point in the build process the tests have been run, so I now wanted to display the results in the CC web dashboard. To do this, I merged the testoutput.xml file into the build status output. This block needs to be put inside the block

            <file> c:\testresults\testoutput.xml</file>

Finally I activated the xmllogger, by adding to the block the

Under this configuration it was possible for me to check code into the trunk of my project, and force a build that checked out the code and unit tests, and automatically ran the tests against it, outputing the results to a the CCNet web dashboard, via a single click.

This entire process can be run from the CCNet web dashboard, or more conveniently, the CCTray sys tray program. There is a moderate overhead in setting up continuous integration but the return on investment grows the longer the system is developed.

Where to go on from here?

My setup could be improved in a number of ways.

  1. Auto build on each commit by using a post commit hook on subversion
  2. Selenium testing for the web functional tests
  3. using FxCop to analyse the complied code to find improvements and include this in build reports

Some of these topics I will explore in future posts

, ,

1 Comment