You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Darren Hartford <dh...@ghsinc.com> on 2004/11/18 16:24:56 UTC

RE: Clovering Cactus tests with Maven

Hey all,
Trying to get Clover reports on some Cactus tests.  I caught the question about clover with test-ear, but I'm not that far (yet).

In just trying to follow some previous directions (below), I'm running Maven-1.0.1 release (which has the Clover-1.6 plugin) and cactus-1.7dev.

Following the directions, when I run "maven clover:report", the clover plugin errors saying you need to run 'clover-setup' first. Well, that's a clover problem, but still a show-stopper for step-by-step execution.  

Moving foward, doing something like "maven clover:on site" to do it all at once with the clover-report-plugin in the maven POM goes through. The Cactus tests are run and I see the results, the cactus-report comes out fine, but a clover report is never created (I don't have any Junit tests, just Cactus).

====snip====
    [cactus] Testcase: blah1 took 0.515 sec
    [cactus] Testcase: blah2 took 0.031 sec
    [cactus] Shutdown message has been posted to the server.
    [cactus] Server shutdown may take a while - check logfiles for completion

.....

    [echo] Generating the Clover...
maven-clover-plugin:report:
clover:test:
    [echo] No tests to run Clover on

clover:init:
Overriding previous definition of reference to clover.classpath

clover:report:
clover:html-report-internal:
    [clover-report] Clover Version 1.3_01, built on July 09 2004
    [clover-report] loaded from: C:\Documents and Settings\dhartford\.maven\repo
sitory\clover\jars\clover-ant-1.3_01.jar
    [clover-report] No coverage data found for 'C:\projects\cpams\cpamsserver3\e
jb_session\target\clover\database\clover_coverage.db'.
    [clover-report] No coverage recordings found. No report will be generated.
===end snip====

My code is compiled/inspected with Clover, and I see all the classes in /target/clover/classes (minus the cactus-tests), so at least that part is working.  Beyond that, I'm not sure what next to check.

-D

> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: Friday, July 16, 2004 7:18 AM
> To: 'Maven Users List'
> Cc: 'Cactus Users List'
> Subject: [Summary] Clovering Cactus tests with Maven
> 
> 
> Hi,
> 
> Some of you asked how to run Clover on Cactus tests. I tried 
> to do it and
> found that indeed there were some issues. I've now modified 
> the Maven Clover
> plugin so that it is possible to Clover Cactus tests. 
> 
> You'll need to do the following:
> 
> 1/ Use at least version 1.6 of the Maven Clover report. ATM, 
> it is not yet
> released so you'll have to build it from the source (CVS HEAD on
> maven-plugins module).
> 
> 2/ In the Maven project used to execute the Cactus tests, add 
> a dependency
> to Clover:
> 
>    <dependency>
>      <groupId>clover</groupId>
>      <artifactId>clover-ant</artifactId>
>      <version>1.3_01</version>
>      <properties>
>        <cactus.bundle>true</cactus.bundle>
>      </properties>
>    </dependency>
> 
> 3/ Then type "maven clean clover:on cactus". This instruments both the
> project's source code + its Cactus tests
> 
> 4/ Once it is finished, type "maven clover:report" to 
> generate the HTML
> Clover report. It will be located in target/docs/clover/index.html
> 
> -Vincent
> 
>