[ http://jira.codehaus.org/browse/MCLOVER-46?page=comments#action_77028 ]
Vincent Massol commented on MCLOVER-46:
---------------------------------------
Everyone,
I've checked the Clover plugin code and we do not perform any check when
there's no Clover database. The problem is that you're generating a clover
database if you run clover:instrument, even if your code only has interfaces.
The Clover plugin has no control on that. Nor does it have any control on the
message output by Clover ("Total coverage of ..."). This comes straight from
the execution of the Clover Check Ant task
(http://cenqua.com/clover/doc/ant/checktask.html).
Andrew,
I have upgraded to a newer version of Clover (1.3.13) in the v2.3 of the
plugin. It seems Clover 1.3.13 is reporting differently where there are no
coverage data in the database. I'd suggest you try running Clover 1.3.13
directly on your code without going through Maven2. You should experience the
same result.
Right now I still don't see of any way to implement this JIRA issue. AFAIK this
has nothing to do with the Clover plugin and this issue shoudl be reported on
the Clover support forums: http://cenqua.com/forums/category.jspa?categoryID=2
Meghan, about your suggestion to be able to turn off some module from executing
Clover, could you please create another JIRA issue.
If everyone agrees, I'm now going to close this issue as "won't fix". Unless
someone has a better idea of course :-)
Thanks
-Vincent
> Coverage reports are incorrect for interface only modules.
> -----------------------------------------------------------
>
> Key: MCLOVER-46
> URL: http://jira.codehaus.org/browse/MCLOVER-46
> Project: Maven 2.x Clover Plugin
> Issue Type: Bug
> Affects Versions: 2.2
> Environment: ubuntu dapper drake. Maven 2.0, clover maven plugin 2.2
> Reporter: Meghan Claire Pike
> Assigned To: Vincent Massol
>
> Our projects require a coverage of at least 1% in order to force everyone to
> at least think about testing. Unfortunately for interface only packages, (due
> to seperation of concerns) clover just goes into a small spasm and dies. It's
> output is like this:
> Clover Version 1.3.12, built on February 08 2006
> loaded from:
> <path...>.m2/repository/com/cenqua/clover/clover/1.3.12/clover-1.3.12.jar
> Academic License registered to EDINA. This license of Clover is provided to
> support coursework at EDINA only.
> You have 29 day(s) before your Academic License expires.
> Updating database at 'target/clover/clover.db'
> Processing files at 1.4 source level.
> Instrumented 12 source files.
> ...
> [INFO] [clover:instrument {execution: default}]
> [INFO] [clover:check {execution: default}]
> [INFO] Checking for coverage of [1%] for database [target/clover/clover.db]
> WARN: No coverage data found for '<path to my api>/target/clover/clover.db'.
> [ERROR] Total coverage of did not meet target of 1%
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Build failed to meet Clover coverage targets
> it doesn't even output 0% or anything like that, which seems to me to be a
> bug. I think clover should maybe understand a little better that testing
> api's doesn't make sense, and is quite difficult to do. I don't have any
> testing classes whatsoever in the project, so it could be from that. But
> clover should have some ability not to enforce coverage on interfaces. (Or
> understand that they can't be tested except indirectly.)
> Thanks!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira