ConsoleReporter

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

Reports Code Coverage for the given coverage database to the console.

用途

java com.atlassian.clover.reporters.console.ConsoleReporter [OPTIONS] PARAMS

Note: in Clover 3.1.x and older a class was named com.cenqua.clover.reporters.console.ConsoleReporter.

Params

-i, --initstring <file>

The initstring of the coverage database.

オプション

-t, --title <string>

Report title

-l, --level <string>

The level of detail to report. Valid values are "summary", "class", "method", "statement". Default value is "summary".

-p, --sourcepath <path>

The source path to search when looking for source files.

-si, --showinnerSince 3.2.0: Show inner functions in the report (like a lambda function inside a method).
-sl, --showlambdaSince 3.2.0: Show lambda functions in the report.

-s, --span <interval>

Specifies how far back in time to include coverage recordings from since the last Clover build. See Using Spans. Default includes "all coverage data found".

-u, --unittestsSince 3.1.6: Show unit tests results summary. By default summary is not listed.
-c, --codetypeSince 3.1.6: The type of code to report on. Valid values are: APPLICATION, TEST, ALL. Default value: APPLICATION

Return code

The ConsoleReporter.main() calls System.exit() and returns a non-zero value in case of error during report generation.

API Usage

ConsoleReporter 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.atlassian.clover.reporters.console.ConsoleReporter;

    ...

    String [] cliArgs = { "-l", "method", "-t", "Method Coverage", "-i", "clover.db" };
    int result = ConsoleReporter.mainImpl(cliArgs);
    if (result != 0) {
           // problem during report generation
    }

java com.atlassian.clover.reporters.console.ConsoleReporter -i clover.db

Reads coverage for the Clover database "clover.db", and produces a summary report to the console.

 

java com.atlassian.clover.reporters.console.ConsoleReporter -l "method" -t "Method Coverage" -i clover.db

Produces the same report as above, but includes method-level coverage information, and a report title.

 

最終更新日: 2013 年 10 月 22 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.