testCoverage: Code coverage test files.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

testCoverage computes the code coverage that a unit test suite provides a set of source files.

Usage

1
testCoverage(sourcefiles, testfiles, ...)

Arguments

sourcefiles

character vector of source code filenames

testfiles

character vector of unit test filenames

...

parameters to pass onto reportCoverage

Details

This function is for testing disorganised source files for packages helper functions are available.

testthat tests are assumed by default, otherwise see reportCoverage for the necessary parameters.

Value

A list containing summary coverage, errors and individual coverage. Side effect: A webpage of the report will be opened.

Author(s)

Mango Solutionssupport@mango-solutions.com

See Also

reportCoverage, pkgCoverage, cranCoverage

Examples

1
2
3
4
5
6
7
## Not run: 
testCoverage(
 system.file("examples/add/R/add.R", package = "testCoverage"),
 system.file("examples/add/inst/tests/testthat/",
  c("tests0/test_add0.R", "tests1/test_add1.R"), package = "testCoverage"))

## End(Not run)

MangoTheCat/testCoverage documentation built on May 7, 2019, 2:24 p.m.