Hi,
Is it possible to create report with aggregated package level coverage. For example: I have 100 packages under source dir and wanted to generate report with aggregation/group of selected packages(grouping of releated packages, so that I will get component level report which tells % of coverage at component level)
src: com.xyz.a .....
com.xyz.z
grouping: 1.com.xyz.a to com.xyz.f
2.com.xyz.g to com.xyz.m ...
report:
com.xyz.a to com.xyz.f(af component) 40%
com.xyz.g to com.xyz.m(gm component) 20%
Thanks
thanks a lot! It solved the problem :) Now I am seeing same stats.
I have one more question here..
some new java file(interface) was added newly to src from last build. This new interface(.java) file instrumented(but I did not see any clover specific lables added to this file) and it has only one method def
ex: public interface Abc{
void xyzAbc();
}
It is missing in clover coverage report.
Is this something expected?.
Interfaces(like above ex) won't show up in the clover report even after instrumentation?.
Can you confirm that you new interface has no code in a method body?
I'm asking because, by default, Clover does not show classes or interfaces having no executable code - you can change this behaviour by setting the showEmpty to true.
<clover-report> <current> <format type="html" showEmpty="true"/> </current> </clover-report>
See: clover-report / current / format
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the reply. Instead of clover-setup can I exclude them in <clover-report> <fileset <exclude ...
Is there any difference in coverage if I exclude files/packages in clover-report instead of clover-setup?.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the reply. Instead of clover-setup can I exclude them in <clover-report> <fileset <exclude ...
Is there any difference in coverage if I exclude files/packages in clover-report instead of clover-setup?.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you exclude files in <clover-setup> then they will not be instrumented at all. Which means that they will not be registered in the clover.db. As a consequence they will not be included in the report as well.
If you exclude files in <clover-report> then such files will be instrumented (in <clover-setup>) and will be registered in a clover.db, but they will not be included in the final report.
So as you can see in both cases you will achieve the same.
What's the difference then?
1) There is a difference in case you want to generate several reports with a different content using the same database.
In such case you shall instrument all files (no exclusions in <clover-setup>) and exclude files in <clover-report> calls. Thanks to this, you will not have to recompile the code in order to get different content of reports.
2) There may be also a performance difference if you use exclusions in <clover-setup> - files which are not instrumented will run faster.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks for information. It is really helpfull.
I have created history point and run history report in the same day.
I am seeing different project stats for both "clover code coverage report" and "Historical coverage report". why these stats are different?. What really history stasts means?. Please let me know?.
ex: Clover Coverage Report statistics for project clover db
stmts:600,100 LOC :2151267 Methods:89940
classes: 11103 NLOC:1212077 Files: 9310
packages:919 TOTAL Coverage :41.4%
Historical coverage Report Project stats: LOC: 2265934 Methods: 94883
NCLOC: 1280188 Classes: 12092
Files: 10033 Packages: 1130
TOTAL: 40.4%
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think this is caused by a fact that a historical report is based on data found in recorded history points. It means that you have to configure proper exclusion patterns for history points as well. See:
https://confluence.atlassian.com/display/CLOVER/clover-historypoint
the <fileset> nested element and the 'filter' attribute (if you use context filters)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.