This function allows the installed package rpact
to be tested.
testPackage(
outDir = ".",
...,
completeUnitTestSetEnabled = TRUE,
types = "tests",
sourceDirectory = NULL
)
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.
If TRUE
(default) all existing unit tests will
be executed; a subset of all unit tests will be used otherwise.
The type(s) of tests to be done. Can be one or more of
c("tests", "examples", "vignettes")
, default is "tests" only.
An optional directory to look for .save
files.
The value of completeUnitTestSetEnabled
will be returned invisible.
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
.
# NOT RUN {
testPackage()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab