Tuesday, June 17, 2008

Continous Builds

Continuous builds are an XP and Agile developer process. It is a process where changes made by the development team are automatically picked up and then followed by a build and a set of automated tests. This the generates a dashboard of all the code modules and their current state. Flagging broken tests or code. Developers can then pick these up and fix them as soon as possible before continuing with more development.
We use Hudson (https://hudson.dev.java.net/) because it is very easy to setup, integrates easily to any and maven as build tools and CVS and SVN for the version control.
The key thing to get right when setting up a continuous build server is to ensure that the build and automated testing can run without user interaction and outside of any IDE. It is no good having unit test that work from inside Eclipse, because you need to be able to run these in a batch type mode. Without this ability, you will always be relying on your developers/testers to run these tests and under pressure this is the first thing that a developer will stop doing right.
Hudson also has the ability to run and report on other checks such as code coverage of the automated tests and 3rd party tools to check for silly coding mistakes. We are using Cobertura (cobertura.sourceforge.net/) for code coverage and Findbugs (findbugs.sourceforge.net/) for code checking and they both work really well particularly in Hudson where we can flag tests that do not have enough code coverage.

No comments: