Home | Forums

XmlReporter

Produces an XML report of Code Coverage for the given coverage database.

Usage

 java com.cenqua.clover.reporters.xml.XMLReporter [OPTIONS] PARAMS

Params

-i, --initstring <file>The initstring of the coverage database.
-o, --outfile <file>The file to write XML output to.

Options

-t, --title <string>Report title
-l, --lineinfoInclude source-level coverage info
-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, --debugSwitch logging level to debug
-v, --verboseSwitch logging level to verbose

API Usage

XMLReporter 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.xml.XMLReporter;
    ...
    String [] cliArgs = { "-i", "clover.db", "-o", "coverage.xml" };
    int result = XMLReporter.mainImpl(cliArgs);
    if (result != 0) {
           // problem during report generation
    }

Examples

 java com.cenqua.clover.reporters.xml.XMLReporter -i clover.db -o coverage.xml

Read coverage for the Clover database "clover.db", and produce a report in the file "coverage.xml"

 java com.cenqua.clover.reporters.xml.XMLReporter -l -t "My Coverage" -i clover.db -o coverage.xml

Produce the same report as above, but include source-level coverage information, and a report title.