Produces a PDF summary report of Code Coverage for the given coverage database.
Usage
Params
-i, --initstring <file> |
The initstring of the coverage database. |
-o, --outputfile <file> |
The file to write the report to. |
Options
-a, --alwaysreport |
Forces a report to be generated, even if there is no coverage data. Defaults to 'false', i.e. a report with no coverage will abort generation. |
-b, --hidebars |
Don't render coverage bars. |
-c, --orderby <compname> |
Comparator to use when listing packages and classes. Default is PcCoveredAsc.
Valid values are:
- Alpha — Alpabetical.
- PcCoveredAsc — Percent total coverage, ascending.
- PcCoveredDesc — Percent total coverage, descending.
- ElementsCoveredAsc — Total elements covered, ascending.
- ElementsCoveredDesc — Total elements covered, descending.
- ElementsUncoveredAsc — Total elements uncovered, ascending.
- ElementsUncoveredDesc — Total elements uncovered, descending.
|
-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".
Valid values are "assert", "static", "instance", "constructor", "method", "switch", "while", "do", "for", "if", "else", "try", "catch", "finally", "sync", or the name of a user-defined Context. See Using Contexts. |
-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'. |
-p, --pagesize <size> |
Specify the page size to render. Valid values are "Letter" and "A4". Default is "A4". |
-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 |
-v, --verbose |
Switch logging level to verbose |
API Usage
PDFReporter 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:
Examples
Reads coverage for the Clover database "clover.db", and produces a pdf report in the file "coverage.pdf".
Produces the same report as above, but includes a report title, and orders lists by total elements covered rather than percentage covered.