All Versions
Clover 4.0 DocumentationClover 3.3 Documentation
Clover 3.2 Documentation
More...
Produces an HTML report of Code Coverage for the given coverage database.
java com.cenqua.clover.reporters.html.HtmlReporter [OPTIONS] PARAMS
-i, --initstring <file> |
The initstring of the coverage database. |
-o, --outputdir <dir> |
The directory to write the report to. Will be created if it doesn't exist. |
-a, --alwaysreport |
Forces a report to be generated, even if there is no coverage data. Defaults to ' |
-b, --hidebars |
Don't render coverage bars. |
-bw |
Don't colour syntax-highlighted source — smaller HTML output. |
-c, --orderby <compname> |
Comparator to use when listing packages and classes. Default is PcCoveredAsc.
|
-d, --debug |
Switch logging level to debug. |
-f, --filter <string> |
Comma or space separated list of contexts to ignore when generating coverage reports. Most useful one is "catch". |
-h, --hidesrc |
Don't render source level coverage. |
-if --includefailcoverage |
Specifies whether or not to include coverage attributed to a test that has failed. If omitted, failed test coverage is not included. Default setting is 'false'. |
-nu, --nounique |
Don't calculate and show unique per-test coverage (for large projects, this can take a significant amount of time). Defaults to |
-p, --sourcepath <path> |
The source path to search when looking for source files. |
-s, --span <interval> |
Specifies how far back in time to include coverage recordings from. See Using Spans. Default includes "all coverage data found". |
-t, --title <string> |
Report title. |
-tw, --tabwidth <int> |
The number of spaces to subsitute TAB characters with. Defaults to 4. |
-v, --verbose |
Switch logging level to verbose. |
HtmlReporter provides a simple API that accepts an array of strings representing the command line arguments and returns an integer result code. The following fragment illustrates use of the API:
import com.cenqua.clover.reporters.html.HtmlReporter;
...
String [] cliArgs = { "-i", "clover.db", "-o", "clover_html" };
int result = HtmlReporter.mainImpl(cliArgs);
if (result != 0) {
// problem during report generation
}
java com.cenqua.clover.reporters.html.HtmlReporter -i clover.db -o clover_html
Reads coverage for the Clover database "clover.db", and produces a report in the directory "clover_html".
java com.cenqua.clover.reporters.html.HtmlReporter -c ElementsCoveredAsc
-t "My Coverage" -i clover.db -o clover_html
Produces the same report as above, but includes a report title, and orders lists by total elements covered rather than percentage covered.