PDFReporter

Clover 2.1 Documentation

Index

Produces a PDF summary report of Code Coverage for the given coverage database.

Usage

java com.cenqua.clover.reporters.pdf.PDFReporter [OPTIONS] PARAMS

Params

-i, --initstring <file> The initstring of the coverage database.
-o, --outputfile <file> The file to write the report to.

Options

-t, --title <string> Report title
-b, --hidebars Don't render coverage bars.
-p, --pagesize <size> Specify the page size to render. Valid values are "Letter" and "A4". Default is "A4".
-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.
-l, --ignore <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.
-s, --span <interval> Specifies how far back in time to include coverage recordings from since the last Clover build. See Using Spans. Defaults to 0 seconds.
-d, --debug Switch logging level to debug
-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:

import com.cenqua.clover.reporters.pdf.PDFReporter;

    ...

    String [] cliArgs = { "-i", "clover.db", "-o", "coverage.pdf" };
    int result = PDFReporter.mainImpl(cliArgs);
    if (result != 0) {
           // problem during report generation
    }

Examples

java com.cenqua.clover.reporters.pdf.PDFReporter -i clover.db -o coverage.pdf

Reads coverage for the Clover database "clover.db", and produces a pdf report in the file "coverage.pdf".

java com.cenqua.clover.reporters.pdf.PDFReporter -c ElementsCoveredAsc
      -t "My Coverage" -i clover.db -o coverage.pdf

Produces the same report as above, but includes a report title, and orders lists by total elements covered rather than percentage covered.

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.