<<

NAME

run_coverage.pl -- code coverage analysis for generated test suites.

SYNOPSIS

  run_coverage.pl -p project_id -d suite_dir -o out_dir [-f include_file_pattern] [-v version_id] [-t tmp_dir] [-D] [-A | -i instrument_classes] [-I]

OPTIONS

-p project_id

The id of the project for which the generated test suites are analyzed. See Project module for available project IDs.

-d suite_dir

The directory that contains the test suite archives. See Test suites.

-o out_dir

The output directory for the results and log files.

-f include_file_pattern

The pattern of the file names of the test classes that should be included (optional). Per default all files (*.java) are included.

-v version_id

Only analyze test suites for this version id (optional). Per default all test suites for the given project id are analyzed.

-t tmp_dir

The temporary root directory to be used to check out program versions (optional). The default is /tmp.

-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.

-D

Debug: Enable verbose logging and do not delete the temporary check-out directory (optional).

-A

All relevant classes: Measure code coverage for all relevant classes (i.e., all classes touched by the triggering tests). By default code coverage is measured only for classes modified by the bug fix.

-I

Ignore failing tests; report all coverage data.

DESCRIPTION

Measures code coverage for each provided test suite (i.e., each test suite archive in suite_dir) on the program version for which that test suite was generated.

The results of the analysis are stored in the database table out_dir/TAB_COVERAGE. The corresponding log files are stored in out_dir/TAB_COVERAGE_log.

Logging

By default, the script logs all errors and warnings to run_coverage.pl.log in the temporary project root. Upon success, the log file of this script and the detailed coverage results for each executed test suite are copied to: out_dir/TAB_COVERAGE_log/project_id.

Test suites

To be considered for the analysis, a test suite has to be provided as an archive in suite_dir. Format of the archive file name:

project_id-version_id-test_suite_src(\.test_id)?\.tar\.bz2

Note that test_id is optional, the default is 1.

Examples:

<<