Learn R Programming

testCoverage (version 0.1.02)

pkgCoverage: Code coverage test packages.

Description

pkgCoverage computes the code coverage that a packages's unit testing suite provides it.

Usage

pkgCoverage(filepaths, test.dir = NULL, ...)

Arguments

packages
character vector of directory paths to package source directories.
test.dir
character containing the relative file path to the tests directory.
...
parameters to pass onto reportCoverage

Value

List containing coverage values and test enviroment. Side effect: A webpage of the report(s) will be opened.

Details

This function is for package source directories.

The function will attempt to detect the directory and type of tests used if no test.dir parameter is passed. See reportCoverage for descriptions of additional parameters.

See Also

reportCoverage, cranCoverage, testCoverage

Examples

Run this code
## Not run: 
# pkgCoverage(
#  filepaths = system.file("examples/add/", package = "testCoverage"),
#  test.dir = "inst/tests/testthat/tests1")
# ## End(Not run)

Run the code above in your browser using DataLab