Package: covr 4.1.0

Jim Hester

covr: Test Coverage for Packages

Track and report code coverage for your package and (optionally) upload the results to a coverage service like 'Codecov' <https://about.codecov.io> or 'Coveralls' <https://coveralls.io>. Code coverage is a measure of the amount of code being exercised by a set of tests. It is an indirect measure of test quality and completeness. This package is compatible with any testing methodology or framework and tracks coverage of both R code and compiled C, C++, Fortran and Rust code.

Authors:Jim Hester [aut, cre], Willem Ligtenberg [ctb], Kirill Müller [ctb], Henrik Bengtsson [ctb], Steve Peak [ctb], Kirill Sevastyanenko [ctb], Jon Clayden [ctb], Robert Flight [ctb], Eric Brown [ctb], Brodie Gaslam [ctb], Will Beasley [ctb], Robert Krzyzanowski [ctb], Markus Wamser [ctb], Karl Forner [ctb], Gergely Daróczi [ctb], Jouni Helske [ctb], Kun Ren [ctb], Jeroen Ooms [ctb], Ken Williams [ctb], Chris Campbell [ctb], David Hugh-Jones [ctb], Qin Wang [ctb], Doug Kelkhoff [ctb], Ivan Sagalaev [ctb, cph]

covr_4.1.0.tar.gz
covr_4.1.0.zip(r-4.7-x86_64)covr_4.1.0.zip(r-4.7-arm64)covr_4.1.0.zip(r-4.6-x86_64)covr_4.1.0.zip(r-4.6-arm64)covr_4.1.0.zip(r-4.5-x86_64)
covr_4.1.0.tgz(r-4.6-x86_64)covr_4.1.0.tgz(r-4.6-arm64)covr_4.1.0.tgz(r-4.5-x86_64)covr_4.1.0.tgz(r-4.5-arm64)
covr_4.1.0.tar.gz(r-4.7-arm64)covr_4.1.0.tar.gz(r-4.7-x86_64)covr_4.1.0.tar.gz(r-4.6-arm64)covr_4.1.0.tar.gz(r-4.6-x86_64)
covr_4.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
covr/json (API)

# Install 'covr' in R:
install.packages('covr', repos = c('https://r-lib.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/r-lib/covr/issues

Pkgdown/docs site:https://covr.r-lib.org

On CRAN:

Conda:

codecovcoveragecoverage-reporttravis-ci

15.93 score 350 stars 21 packages 2.5k scripts 154k downloads 2 mentions 41 exports 17 dependencies

Last updated from:97f4b1e0fd. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK186
linux-devel-x86_64OK228
source / vignettesOK198
linux-release-arm64OK230
linux-release-x86_64OK250
macos-release-arm64OK210
macos-release-x86_64OK406
macos-oldrel-arm64OK209
macos-oldrel-x86_64OK425
windows-devel-arm64OK407
windows-devel-x86_64OK220
windows-release-arm64OK526
windows-release-x86_64OK184
windows-oldrel-x86_64OK217
wasm-releaseOK108

Exports:annotate_coveragebadgebase_r_code_coveragebase_r_compiled_coveragebase_r_exclusionscoberturacode_coveragecodecovcolorblind_palettecoverage_to_listcoverage_to_markdowncoverallscurrent_coveragedisplay_nameenvironment_coveragefile_coveragefile_reportfile_report_htmlfunction_coveragegitlabin_covrinstrument_base_rinstrument_packageslcovlocal_instrumented_packagespackage_coveragepercent_coveragereportreport_htmlshiny_app_coveragesonarqubetally_coveragetally_teststo_coberturato_sonarqubetrace_coverageuninstrument_base_runinstrument_packagesvaluewith_coveragezero_coverage

Dependencies:askpassclicurldigestgluehttr2jsonlitelifecyclemagrittropensslR6rexrlangsysvctrswithryaml

How does covr work anyway?
Introduction | Instrumenting R Source Code | Modifying the call tree | Source References | Refining Source References | Replacing Source In Place | Object Orientation | S3 Classes | S4 Classes | Reference Classes | Compiled code | Gcov | Makevars | Subprocess | Several packages | Packages loaded with load_all() | Rust | Output Formats | Reports and Export Formats | Codecov.io and Coveralls.io | Prior Art | Overview | R-coverage | Test Coverage | Covr | Conclusion

Last update: 2026-11-28
Started: 2015-01-21

Coverage of Shiny apps
Apps in a package | Server tests with testServer() | Browser tests with shinytest2 | Apps that are not in a package

Last update: 2026-11-08
Started: 2026-11-08

Readme and manuals

Help Manual

Help pageTopics
covr: Test coverage for packagescovr-package covr
Annotate source code with line and branch coverageannotate_coverage
Convert a coverage object to a data frameas.data.frame.coverage
Create a coverage badgebadge
Coverage of the R code of base Rbase_r_code_coverage
Coverage of the compiled code of Rbase_r_compiled_coverage
The functions that are not instrumented by defaultbase_r_exclusions
Combine coverage objectsc.coverage
Create a Cobertura XML filecobertura
Calculate coverage of code directlycode_coverage
Run covr on a package and upload the result to codecov.iocodecov
Colors for color vision deficiencycolorblind_palette
Coverage objectscoverage
Convert a coverage dataset to a listcoverage_to_list
Convert a coverage dataset to a markdown tablecoverage_to_markdown
Run covr on a package and upload the result to coverallscoveralls
Branch coveragecovr.branch_coverage
Record Test Traces During Coverage Executioncovr.record_tests
Coverage measured so far in the current processcurrent_coverage
The source file of each tracedisplay_name
Calculate coverage of an environmentenvironment_coverage
Exclusionsexclusions
Calculate test coverage for sets of filesfile_coverage
A coverage report for a specific filefile_report file_report_html
Calculate test coverage for a specific function.function_coverage
Run covr on package and create report for GitLabgitlab
Determine if code is being run in covrin_covr
Instrument the R code of the base packages of Rinstrument_base_r
Measure the coverage of installed packages, however their code is runinstrument_packages local_instrumented_packages trace_coverage uninstrument_packages
Create an LCOV tracefilelcov
Calculate test coverage for a packagepackage_coverage
Provide percent coverage of packagepercent_coverage
Print a coverage objectprint.coverage
Display covr results using a standalone reportreport
A coverage report to include in other documentsreport_html
Calculate test coverage for a Shiny appshiny_app_coverage
Create a SonarQube Generic XML filesonarqube
Tally coverage by line, expression, function or branchtally_coverage
Tally which tests ran each linetally_tests
Restore the base packages that were instrumenteduninstrument_base_r
Retrieve the execution counts from a coverage objectvalue
Calculate coverage of arbitrary code run against an environmentwith_coverage
Provide locations of zero coveragezero_coverage