Dashboard > CruiseControl > Home > CustomMetrics
CustomMetrics Log In | Sign Up   View a printable version of the current page.

Added by Bryce Hendrix , last edited by Bryce Hendrix on Apr 17, 2006  (view change)
Labels: 
(None)

The build pass/fail metrics are useful, but its nice to have metrics for the quality of the build as well. This is how we, Enthought, created a metrics chart from junit results in the CC build logs. We have a slightly modified xslt, so your milage may vary with the xpath, but this should provide a good start. We've also implemented coverage metrics, but its implemented in exactly the same way.

We created 2 java classes:

The BuildResult class reads/writes XML files containing build result summaries. We use this class for a couple of different pages, so it containts unit test results, coverage results, build labels, build date and error message. You can trim out whatever you don't need.

The UnittestDatasetProducer class takes a list of BuildResults and turns it into a TimeSeriesCollection containing 2 series, the # of tests ran & the number of tests passed. This class inherits from de.laures.cewolf.DatasetProducer and is responsible for handing off the data to be charted.

We then created a jsp to display the chart. Most of the logic is contained in the jsp, and should probably be moved into a separate Java class. There is an assumption that the jsp has a parameter "project" which provides the name of the project and more importantly, the directory in which to read the cruise control logs from.

All 3 files are attached. I hope someone finds them useful.

Hi

I'am just configured my CruiseControl and I'am getting using it. I'am looking to custom metrics and I find yours very useful. I've already downloaded the attached files, but I can't use the metrics beacuse I don't know how to install it to the system.

Would you be so kind to describe me the installation setps please. Thanks in advance.

Best regards,

Szatmari

Powered by a free Atlassian Confluence Open Source Project / Non-profit License granted to ThoughtWorks, Inc.. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators