View source: R/run_covr_skip_nstf.R
| run_covr_skip_nstf | R Documentation |
This function maps package source files to non‑standard test scripts, detects failing or skipped tests, executes the remaining tests manually, computes code coverage, and returns structured results. It is intended for packages that do not use the standard 'testthat' framework (e.g., base R tests under 'tests/', Bioconductor‑style tests in 'inst/tests/', or other legacy/custom scripts).
run_covr_skip_nstf(pkg_source_path, test_pkg_data, cov_env)
pkg_source_path |
Character. Path to the root of the package source directory. |
test_pkg_data |
List. Output from |
cov_env |
Environment that holds the temporary coverage workspace and shared state for the run. |
This NSTF workflow does not rely on 'testthat' reporters. Instead, it:
maps source files to available NSTF test scripts,
identifies failing or problematic tests and derives a skip map,
runs the remaining test scripts, and
computes coverage on the successfully executed regions.
The output mirrors the structure returned by the STF skip‑aware workflow so that downstream reporting remains consistent across frameworks.
A named list containing coverage results and diagnostics:
Numeric. Overall percentage of lines covered across the package.
List. File‑ or element‑level coverage results (as derived from covr output), including per‑file coverage, any errors, and diagnostic notes.
Long‑format summary of test outcomes (e.g., PASS/FAIL/ERROR/SKIPPED), when available from the NSTF execution.
A data frame describing lines or regions skipped during coverage
(if any). NULL if no skipping was required.
Character vector of source files for which no tests were found.
If no valid NSTF test directory is detected, an “empty” coverage object may be
returned via create_empty_covr_list().
Other nstf_utility:
check_covr_skip_nstf(),
check_covr_skip_testit(),
get_nstf_test_path(),
get_source_test_mapping_nstf()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.