<<

NAME

d4j-coverage -- run code coverage analysis for a checked-out project version.

SYNOPSIS

  d4j-coverage [-w work_dir] [-r | [-t single_test] [-s test_suite]] [-i instrument_classes]

DESCRIPTION

This script executes a test or a test suite on a checked-out project version and measures statement and branch coverage, using Cobertura. See Cobertura's documentation for their definition of branch coverage.

OPTIONS

-w work_dir

The working directory of the checked-out project version (optional). Default is the current directory.

-r

Only execute relevant developer-written tests (optional). By default all developer-written tests of the checked-out project version are executed.

-t single_test

Only run this single test method (optional). By default all tests are executed. Format: <test_class>::<test_method>.

-s test_suite

The archive file name of an external test suite (optional). The default test suite is the developer-written test suite of the checked-out project version. See Test suites.

-i instrument_classes

Measure code coverage for all classes listed in instrument_classes (optional). By default, code coverage is measured only for the classes modified by the bug fix. The file instrument_classes must contain fully-qualified class names -- one class per line.

Test suites

An external test suite has to be provided as an archive that contains the test sources. Format of the archive file name:

project_id-version_id-test_suite_src.test_id.tar.bz2

Examples:

<<