This recipe is easiest way to I know to generate test coverage reports for a sakai project:
- Download the sakai developer license for clover (see attached)
- Write unit tests and configure maven to run these tests and/or test suites (see the maven test documentation for help setting up unit tests in maven)
- maven -Dmaven.clover.license.path=<path to clover.license> clover
- The test coverage reports are generated in target/docs/clover
One of the things that I don't like about this plugin (or that I simply don't know how to do yet) is to generate a report based on multiple projects. For instance, since our hibernate pojos must be packaged separately from our service implementations (and hence, our tests of our services), the pojos do not appear in the clover report for the service implementation. Kind of a drag for hibernate projects...
Here is a sample clover report.