Skip to main content

CI Adoption Stories (7/8) Clever tools to optimize Continuous Integration

Posted by johnsmart on May 26, 2009 at 9:26 PM PDT

This case study is the seventh of an 8-part blog series about why so many developers adopt continuous integration, and originally published on the Atlassian blogs. It naturally has a bit of a Bamboo slant to it (if you look close enough, you can even see the odd panda), but the issues discussed apply to any team trying to adopt modern development practices, no matter what CI tool is used.


Clever tools to optimize Continuous Integration

Sandra works in a large government service in Toronto. She is in charge of a team of seasoned developers whose job is to provide technical support and mentoring to other teams, mostly made up of less experienced developers. Recently, her team has been called in to help out a team full of very inexperienced Java developers on an important external-facing web application. These developers, recently brought over from COBOL and the world of mainframes, have a basic Java training but very little experience in the way of best practices. Her team's job is to mentor these inexperienced developers, teaching them the tricks of the trade, so to speak.

Appealing plugins

Atlassian BambooMetrics play a key role in this task. Sandra set up a special "code quality" build plan, which runs a swathe of static analysis tests (including Checkstyle, PMD, and FindBugs), and also comprehensive code coverage reporting using Clover. The Bamboo plugins for each of these tools give her a high-level picture of how these metrics evolve over time. This is an important tool for her to keep tabs on how well the trainee developers are applying the techniques that they are being taught. For example, low or dropping code coverage on a class may indicate that one of the new developers is having trouble assimilating the test-driven development and testing practices that her team is trying to teach.

Atlassian CloverAlthough a high-level view is just what the doctor ordered when you want to keep tabs on the overall health of your development practices, there are still times when you would like to be able to drill down into the details, and see exactly what the violations were in a particular build, or what lines of code were not being tested. To this end, Sandra stores the HTML reports generated by each tool as build artifacts. This way, she can drill down into the detailed reports of any build whenever she wants.

Watertight reports

These reports are also an important part of Sandra's training strategy. She reviews both the high-level statistical views and the detailed reports in a weekly code quality meeting, where any new issues or trends are discussed. Sample Clover Historical ReportIn one of the first meetings, for example, Sandra pointed out the increasing number of Checkstyle violations related to an absence of Javadocs. A short talk on the merits of commenting ones code was enough to put most of the developers back on the right track. The issues raised by FindBugs, for example, are particularly educational, and are often used to discuss some of the finer points of Java programming. In one instance, for example, the discussion over one FindBugs issue reveiled a fundamental misunderstanding about the immutability of Java Strings, which was rectified on the spot by an impropmtu tutorial on the topic of Java Strings.


"Probably the best training course I've been on."..."Not just how to write Java code but the 'business end' - how to build, test, deploy, manage and monitor"..."One of the best and most useful courses I have attended. And they didn't even try to sell me anything!" - Coming soon to London! Get up to scratch with the latest in Java tools and best practices! Sign up on the 2009 season of the Java Power Tools Bootcamps.