Java: Collect and Consolidate Code Metrics Statistics
By admin on Sep 12, 2008 in Java, open source
QALab collects and consolidates data from several QA tools and keeps track of them overtime. This allows developers, architects and project managers alike to be presented with a trend of the QA statistics of their project.
The following tools are currently supported:
- Checkstyle: code style validation and design checks. QALab keeps track of number of violations per file and overall.
- PMD: Code checks (possible bugs, dead code, sub-optimal code, etc). QALab keeps track of number of violations per file and overall.
- PMD CPD: Duplicate code (always a bad idea) detection. QALab keeps track of number of the overall number of duplicated lines.
- FindBugs: fantastic tool to detect potential bugs (really!). QALab keeps track of number of violations per file and overall.
- Cobertura: Coverage tool. QALab keeps track of percentage of branch and line coverage.
- Simian: excellent duplicate code detection (non-open source). QALab keeps track of number of the overall number of duplicated lines.
QALab can be used via ant or Maven. There are three main steps to using QALab:
- Collect Data from QA Tools into a generic qalab.xml format. This is a necessary step to consolidate data. Refer to the documentation from Checkstyle, PMD, PMD CPD (Copy Paste Detector), FindBugs, Cobertura and Simian in order to generate the xml reports.
- Generate Charts from qalab.xml for each file; these will show the trends over time for each file and the overall project.
- Generate a summary xml and html pages with the files that have seen a change in their QA statistics over the last n days. This is particularly useful for developers who can see the impact of the latest code checked in.
Popularity: 1% [?]
Freddy Mallet | Sep 15, 2008 | Reply
If you’re interested by QA tools, perhaps you can take a look to Sonar (http://sonar.codehaus.org) which is an Open Source product quite similar to QALab with a more integrated view over all your projects.
admin | Sep 15, 2008 | Reply
Sonar looks good. Will try it. Thanks for the info