<<

NAME

Coverage.pm -- helper subroutines for code coverage analysis.

DESCRIPTION

This module provides helper subroutines for code coverage analysis using Cobertura.

Static subroutines

Coverage::coverage(project_ref, instrument_classes, src_dir, log_file, relevant_tests, [single_test, [merge_with]])

Measures code coverage for a provided Project reference. instrument_classes is the name of a file that lists all the classes which should be instrumented. src_dir provides the root directory of the source code, which is necessary to generate reports.

The test results are written to log_file, and the boolean parameter relevant_tests indicates whether only relevant test cases are executed.

If single_test is specified, only that test is run. This is meant to be used in conjunction with merge_with, which is the path to another .ser file obtained by running coverage. This enables incremental analyses.

Coverage::coverage_ext(project, instrument_classes, src_dir, test_dir, include_pattern, log_file)

Determines code coverage for an external test suite. instrument_classes is the name of a file that lists all the classes which should be instrumented. src_dir provides the root directory of the source code, which is necessary to generate reports.

Coverage::insert_row(hashref, [out_dir])

Insert a row into the database table TAB_COVERAGE. hashref points to a hash holding all key-value pairs of the data row. out_dir is the optional alternative database directory to use.

Coverage::copy_coverage_logs(project, vid, suite, test_id, log_dir)

Copies the coverage log files to a permanent directory log_dir. project is the reference to a Project, vid is the version id, suite specifies the suite tag (e.g., manual, randoop, evosuite-branch), and test_id provides the id of the test suite.

<<