
test.assessr helps in the assessment of a package’s test reliability and validity.
It calculates unit test coverage for packages with standard testing frameworks and non-standard testing frameworks, including Bioconductor packages.
This package executes the following tasks:
upload the source package(tar.gz file)
Unpack the tar.gz file
Install the package locally
Run code coverage
Create a Personal Access Token (PAT) on
github
github accountSanofi-Public
authorization)Create a .Renviron file with your GITHUBTOKEN
as:
# .Renviron
GITHUBTOKEN=dfdxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxfdf
auth_token = Sys.getenv("GITHUBTOKEN")
devtools::install_github("Sanofi-Public/test.assessr", ref = "main", auth_token = auth_token)
To assess your package’s test coverage, do the following steps:
1 - save your package as a tar.gz file
RStudio ->
Build Tab -> More ->
Build Source Package2 - Run the following code sample by loading or add path parameter to
your tar.gz package source code
# for local tar.gz R package
dp <- (path/to/your/package)
test_package_coverage <- get_package_coverage(dp)
generate_test_report(test_package_coverage)test.assessr resultsFor a package with a standard testing framework such as
testthat or testit or non-standard testing
frameworks such as BiocGenerics and RUnit,
test_assessr can provide data on which tests are passing
and which tests are skipped.
The standard testing framework test report tells you which tests have passed:

The report provides information on which test blocks have passed and the start line of each test block.
The standard testing framework test report tells you which tests have been skipped:

The report provides information on which test blocks have passed, expectation type, and the start line of each test block.
The non-standard testing framework test report tells you which functions have no tests:

The report tells you which tests have passed:

The test report tells you which tests have been skipped:

The project is inspired by the covrpage and
mpn.scorecard
packages and draws on some of their ideas and functions.