Continuous Integration, another chapter of XP

Some time ago in one of my posts I have mentioned XP, that is eXtreme Programming. I was asked by one of my colegues about it few days ago. He was asking about tools for .NET for XP practice mentioned in title. Well, as an exercise I’m going to present you tools for Continuous Integration for Java and for .NET platforms.

Just a word of explanation for those who forgot what Continuous Integration is. It is a XP practice. Continuous Integration means that you are suppose to build multiple times a day. By build I mean not only code compilation but also running all tests. It is practice that IMIDIATELY shows you if someone from the team has been a naughty person and did something wrong to break the build. If compilation survive build there are always Unit Tests that can fail. What are Unit Test one may ask? Well, if you don’t know that then don’t read rest of this post :).

Anyway, let’s take closer look what are the tools that are available for both platforms. Lets start with Java.

Our source code repositories are kept within Subversion. Our build tool was Maven2. It is very powerful build tool. To configure your build you need to define Project Object Model in one XML file with all it dependencies. When Maven builds a project it downloads all necessary libraries and dependencies from a common repository. Maven also has a plugin to run JUnit test and Coverage reports. At the end there only need to be a tool that kicks off build automatically, reports any failures and present results in readable format. We started to use CruiseControl for that, but after a while we moved to Continuum. As a project from the same “garage” ( as Maven it turns out to be a very good tool. Much easier to configure and integrate with Maven.

It was all running nicely on a Linux server. Continuum creates build reports in readable HTML, and because it contains Jetty you don’t need a separate http server to present this reports. Very good and straight forward bunch of tools, and most important free of charge.

Now, let’s take a look what’s there for .NET.

Our source repositories are kept within Subversion as well ๐Ÿ™‚ As build tool we are using Nant. In theory it’s same tool that exists for Java (ANT) but for .NET. It means that build scripts look similar. Nant has it’s own compiler, but you can specify to use MSBUILD, which is Visual Studio .NET build tool. It’s much easier to use because all you have to do is point your Nant into a Visual Studio solution file and it builds the whole project for you. For unit testing we are using NUnit. This is an extra tool that needs to be installed separately. Coverage reports are build using NCover. All of that is running within CruiseControl.NET service. It checks for modifications in source code in our Subversion repository and kicks off build. If build is broken, we are receiving information about it. To present builds reports in HTML format we have IIS running on build machine.

This is it. Simple as that. I do need to say though that tools for Java are very well done and well integrated. With .NET you do need to spend some hours just to configure the damn thing and make it running. Anyway, there is a lot of info on projects sites and forums, just read it and don’t try to reinvent the wheel ๐Ÿ™‚

If you are still reading this it means that you really need this info or you are crazy ๐Ÿ™‚

Stay positive, Gregster

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s