/
Checking Test Coverage
Checking Test Coverage
, multiple selections available,
Related content
Testing Framework
Testing Framework
More like this
How to run a single testthat test....
How to run a single testthat test....
More like this
The testing environment
The testing environment
More like this
Running tests locally
Running tests locally
More like this
Connecting to the Testing dataset
Connecting to the Testing dataset
More like this
"Testers" documentation
"Testers" documentation
More like this
DataSHIELD Wiki by DataSHIELD is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Based on a work at http://www.datashield.ac.uk/wiki
The coverage of the 'testthat' tests can be assessed by generating a Test Coverage Report.
Test Coverage Reports can be generated using the R package 'covr', which can be installed by using:
install.packages("covr", dependencies=TRUE)
library("covr")
The Test Coverage Report is a set of HTML web pages. The commands to generate the Report, in this case for the 'dsBaseClient' package are:
pc <- covr::package_coverage(code=c("testthat::test_package('dsBaseClient')"))
covr::report(pc, file="/tmp/cr/index.html")
The Report will be automatically displayed when generated, and a copy placed in the "/tmp/cr", if the above commands are used.