Test Leads/Managers need to check build test metrics constantly (actually, the whole team does), and a painful part of CruiseControl and CruiseControl.rb is checking one build against another. Or the last 10 builds. Or maybe all of the builds in the current iteration or release. That isn’t easy, and sometimes involves Excel charts to show metrics over time. Not fun.
Recently I’ve been playing around with Ruby and the Google Charts api, to display testing metrics. So far, all I have is one Ruby script, which parses CC log files for important information. In this example, it looks for Selenium pass/fail numbers. Using the Google Charts api (see here: http://code.google.com/apis/chart), the relevant info is passed to Google.
There are two options with Google Charts. First, it can take a url, similar to:
http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250×100&chl=Hello|World
Or, you can create an html img tag, like:
<img src="http://chart.apis.google.com/chart?chs=250x100&chd=t:60,40&cht=p3&chl=Hello|World"/>
The chs, cht, chd, chl are parameters that Google Charts understands, and that is where we pass in the pass/fail metrics. Here is an example:

This is all done withwith one relatively simple Ruby script. All it does is iterate over the CruiseControl log files, then searches for the relevant information. For Selenium RC results, it would look for something like:
Finished in 34.05 seconds
15 tests, 15 assertions, 6 failures, 3 errors
For each log file, if you grab that line and parse the meaningful info, you can save the data off into img tags somewhere and include it in html, like on a wiki, or Mingle. If you want to learn more about Ruby scripting, I highly recommend Brian Marick’s book: Everyday Scripting with Ruby: For Teams, Testers, and You.
There are certainly some problems with this solution. I’m not crazy about the Google Charts api. Some of the charts are easier to customize than others, and it’s difficult to display actual data in certain graphs. Google asks that you hit the api “less than 250,000 times a day”, which I doubt would be a problem for most folks. But you also need an internet connection, which won’t be a problem until you don’t have one.
Also, as you might see, there could be an ethical/legal issue with sending your build metrics to Google. Not sure where I come down on that one… I’m no conspiracy theorist, but I certainly understand if that concerns people. Personally, I like the Google Charts solution, because you don’t need to install anything, just as long as you have Ruby.
There are some other options out there. I’m taking a look at Gruff and Scruffy too, which look a bit easier to implement, but you need RMagick and ImageMagick installed, which can be a pain on OSX.