Package: covr 3.6.5.9002

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_3.6.5.9002.tar.gz
covr_3.6.5.9002.zip(r-4.7-x86_64)covr_3.6.5.9002.zip(r-4.7-arm64)covr_3.6.5.9002.zip(r-4.6-x86_64)covr_3.6.5.9002.zip(r-4.6-arm64)covr_3.6.5.9002.zip(r-4.5-x86_64)
covr_3.6.5.9002.tgz(r-4.6-x86_64)covr_3.6.5.9002.tgz(r-4.6-arm64)covr_3.6.5.9002.tgz(r-4.5-arm64)covr_3.6.5.9002.tgz(r-4.5-x86_64)
covr_3.6.5.9002.tar.gz(r-4.7-arm64)covr_3.6.5.9002.tar.gz(r-4.7-x86_64)covr_3.6.5.9002.tar.gz(r-4.6-arm64)covr_3.6.5.9002.tar.gz(r-4.6-x86_64)
covr_3.6.5.9002.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.82 score 349 stars 21 packages 2.5k scripts 158k downloads 2 mentions 32 exports 13 dependencies

Last updated from:6ca6e8ff16. Checks:13 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64NOTE204
linux-devel-x86_64NOTE221
source / vignettesOK200
linux-release-arm64NOTE183
linux-release-x86_64NOTE244
macos-release-arm64NOTE231
macos-release-x86_64NOTE416
macos-oldrel-arm64NOTE201
macos-oldrel-x86_64NOTE517
windows-devel-arm64NOTE306
windows-devel-x86_64NOTE345
windows-release-arm64NOTE324
windows-release-x86_64NOTE283
windows-oldrel-x86_64NOTE256
wasm-releaseOK108

Exports:annotate_coverageazurebadgecoberturacode_coveragecodecovcolorblind_palettecoverage_to_listcoverage_to_markdowncoverallsdisplay_nameenvironment_coveragefile_coveragefile_reportfile_report_htmlfunction_coveragegitlabin_covrlcovpackage_coveragepercent_coveragereportreport_htmlshiny_app_coveragesonarqubetally_coveragetally_teststo_coberturato_sonarqubevaluewith_coveragezero_coverage

Dependencies:askpassclicurldigesthttrjsonlitemimeopensslR6rexsyswithryaml

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 | Rust | Output Formats | Codecov.io and Coveralls.io | Prior Art | Overview | R-coverage | Test Coverage | Covr | Conclusion

Last update: 2026-11-10
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 counters object to a coverage objectas_coverage
Clean and restructure counter tests for a coverage objectas_coverage_with_tests
Convert a coverage object to a data frameas.data.frame.coverage
Run covr on a package and output the result so it is available on Azure Pipelinesazure
Create a coverage badgebadge
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
Retrieve the number of times the test call was calledcurrent_test_call_count
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
Is the source bound to the expressionhas_srcref
Determine if code is being run in covrin_covr
Is the expression a call to covr:::countis_covr_count_call
Returns TRUE if we've moved on from test reflected in .current_testis_current_test_finished
Create an LCOV tracefilelcov
Initialize a new test counter for a coverage tracenew_test_counter
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 file for test coverage according to <https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/test-coverage/generic-test-data> Based on cobertura.Rsonarqube
Tally coverage by line, expression, function or branchtally_coverage
Tally which tests ran each linetally_tests
Truncate call objects to limit the number of argumentstruncate_call
Retrieve the execution counts from a coverage objectvalue
Calculate coverage of arbitrary code run against an environmentwith_coverage
Provide locations of zero coveragezero_coverage