testPackage: Test Package
Description
This function allows the installed package rpact
to be tested.
Usage
testPackage(
outDir = ".",
...,
completeUnitTestSetEnabled = TRUE,
types = "tests",
sourceDirectory = NULL
)
Arguments
outDir
The output directory where all test results shall be saved.
By default the current working directory is used.
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.
sourceDirectory
An optional directory to look for .save
files.
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
.
Examples
Run this code# NOT RUN {
# }
# NOT RUN {
testPackage()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab