View source: R/f_quality_assurance.R
testPackage | R Documentation |
This function ensures the correct installation of the rpact
package by performing
various tests. It supports a comprehensive validation process, essential for GxP compliance
and other regulatory requirements.
testPackage(
outDir = ".",
...,
completeUnitTestSetEnabled = TRUE,
connection = list(token = NULL, secret = NULL),
testFileDirectory = NA_character_,
downloadTestsOnly = FALSE,
addWarningDetailsToReport = TRUE,
reportType = c("compact", "detailed", "Rout"),
testInstalledBasicPackages = TRUE,
scope = c("basic", "devel", "both", "internet", "all"),
openHtmlReport = TRUE,
keepSourceFiles = FALSE
)
outDir |
The absolute path to the output directory where all test results will 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 |
connection |
A |
testFileDirectory |
An optional path pointing to a local directory containing test files. |
downloadTestsOnly |
If |
addWarningDetailsToReport |
If |
reportType |
The type of report to generate.
Can be |
testInstalledBasicPackages |
If |
scope |
The scope of the basic R package tests to run. Can be |
openHtmlReport |
If |
keepSourceFiles |
If |
This function is integral to the installation qualification (IQ) process of the rpact
package,
ensuring it meets quality standards and functions as expected. A directory named rpact-tests
is created within the specified output directory, where all test files are downloaded from a secure
resource and executed. Results are saved in the file testthat.Rout
, located in the
rpact-tests
directory.
Installation qualification is a critical step in the validation process. Without successful IQ,
the package cannot be considered fully validated. To gain access to the full set of unit tests,
users must provide token
and secret
credentials, which are distributed to
members of the rpact user group as part of the validation documentation.
For more information, see vignette rpact_installation_qualification.
Invisibly returns the value of completeUnitTestSetEnabled
.
For more information, please visit: https://www.rpact.org/vignettes/utilities/rpact_installation_qualification/
## Not run:
# Set the output directory
setwd("/path/to/output")
# Basic usage
testPackage()
# Perform all unit tests with access credentials
testPackage(
connection = list(
token = "your_token_here",
secret = "your_secret_here"
)
)
# Download test files without executing them
testPackage(downloadTestsOnly = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.