Question

I've recently integrated Junit and Emma into CruiseControl (CC) so it creates nice reports per build. I'd like to see some trending graphs based on some of the info Emma gives like the coverage % numbers and the summary:

OVERALL STATS SUMMARY  
total packages: 54  
total executable files: 1001  
total classes:  1133  
total methods:  11814  
total executable lines: 112428  

Ideally, we could have one page that has (google charts?) graphs of each that gets updated every build. I googled a bit and it looks like there is a jenkins plugin that might do this, but I didn't see anything similar for CC. I'm also planning on getting Sonar up and running in CC too so maybe Sonar does this?

I could certainly write my own code to create trending graphs (doesn't seem too hard to parse the emma output and create a page of graphs) but I would rather not re-invent the wheel.

Ah - just found this "Another approach would be to use the Sonar plugin for Hudson to maintain trending of coverage over time" in Can my build stipulate that my code coverage never get worse? I could install Hudson and use that instead of CC but would rather not if I don't have to.

So - my question - what's the easiest way to get trending coverage/stats on my java code (hopefully within CruiseControl)?

Was it helpful?

Solution

Using the Sonar Hudson/Jenkins plugin is definitely not mandatory to be able to run Sonar analyses. You can invoke Sonar from any tool (command line, CI tool like CC, ...etc.).

You just need to provide Sonar with some information, may it be in the POM if you're using Maven, in a build.xml file if you're using Ant, in a "sonar-project.properties" file if you plan to use the simple Sonar Runner, or just by passing properties if you will be using Jenkins/Hudson.

Check out our documentation on the different ways to invoke Sonar to know more about all this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top