testPackage {rpact}R Documentation

Test Package

Description

This function allows the installed package rpact to be tested.

Usage

testPackage(
  outDir = ".",
  ...,
  completeUnitTestSetEnabled = TRUE,
  types = "tests",
  connection = list(token = NULL, secret = NULL)
)

Arguments

outDir

The output directory where all test results shall be saved. By default the current working directory is used.

...

Ensures that all arguments (starting from the "...") are to be named and that a warning will be displayed if unknown arguments are passed.

completeUnitTestSetEnabled

If TRUE (default) all existing unit tests will be executed; a subset of all unit tests will be used otherwise.

types

The type(s) of tests to be done. Can be one or more of c("tests", "examples", "vignettes"), default is "tests" only.

connection

A list where owners of the rpact validation documentation can enter a token and a secret to get full access to all unit tests, e.g., to fulfill regulatory requirements (see www.rpact.com for more information).

Details

This function creates the subdirectory rpact-tests in the specified output directory and copies all unit test files of the package to this newly created directory. Then the function runs all tests (or a subset of all tests if completeUnitTestSetEnabled is FALSE) using testInstalledPackage. The test results will be saved to the text file testthat.Rout that can be found in the subdirectory rpact-tests.

Value

The value of completeUnitTestSetEnabled will be returned invisible.

Examples

## Not run: 
testPackage()
## End(Not run)

[Package rpact version 3.3.2 Index]