Tuesday, November 3, 2009

WattDepot Client and Continuous Integration

These days, I learned about continuous integration, which automatically download the code from the repository and try to built it and run all the tests. In the beginning, I thought it is kind of redundant because if I commit some code, I will make sure there is no error, so why do we need another tool to do it again?
However after a while, I figured that actually I am wrong.
The reason why continuous integration is significant because different user may have a different environment setup. For example, person A commits something which depends on a class file he just created. When he is doing SVN commit, he didn't commit the new class file, because Tortoise SVN does not check non-versioned file automatically. In that case, although the code works well with person A's environment, it will introduce errors in any other user's environment. Now we need some kind of tool to prevent this sadly scenario.
For our WattDepot Client project, we used Hudson for continuous integration. Hudson is an open source software that supports continuous integration. It has a simple and clear user interface. You may set up a build schedule for your project. Then it will download your project and try to build it according to the schedule you set, like a batch program. All you need to do is to include a hudson.build.xml in the Ant build system. You may also want to leave the project discussion email address, so that Hudson will send a report email once it fails building the project. I believe all of these will facilitate group project dramatically.

No comments:

Post a Comment