covr3.6.5 package

Test Coverage for Packages

as_coverage_with_tests

Clean and restructure counter tests for a coverage object

as_coverage

Convert a counters object to a coverage object

azure

Run covr on a package and output the result so it is available on Azur...

clear_counters

clear all previous counters

code_coverage

Calculate coverage of code directly

codecov

Run covr on a package and upload the result to codecov.io

count_test

Append a test trace to a counter, updating global current test

count

increment a given counter

coverage_to_list

Convert a coverage dataset to a list

coveralls

Run covr on a package and upload the result to coveralls

covr-package

covr: Test coverage for packages

covr.record_tests

Record Test Traces During Coverage Execution

current_test_call_count

Retrieve the number of times the test call was called

current_test_index

Retrieve the index for the test in .counters$tests

current_test_key

Build key for the current test

display_name

Retrieve the path name (filename) for each coverage object

environment_coverage

Calculate coverage of an environment

exclusions

Exclusions

file_coverage

Calculate test coverage for sets of files

file_report

A coverage report for a specific file

function_coverage

Calculate test coverage for a specific function.

gitlab

Run covr on package and create report for GitLab

has_srcref

Is the source bound to the expression

in_covr

Determine if code is being run in covr

is_covr_count_call

Is the expression a call to covr:::count

is_current_test_finished

Returns TRUE if we've moved on from test reflected in .current_test

key

Generate a key for a call

new_counter

initialize a new counter

new_test_counter

Initialize a new test counter for a coverage trace

package_coverage

Calculate test coverage for a package

percent_coverage

Provide percent coverage of package

print.coverage

Print a coverage object

report

Display covr results using a standalone report

system_check

Run a system command and check if it succeeds.

system_output

Run a system command and capture the output.

tally_coverage

Tally coverage by line or expression

to_cobertura

Create a Cobertura XML file

to_sonarqube

Create a SonarQube Generic XML file for test coverage according to htt...

trace_calls

trace each call with a srcref attribute

truncate_call

Truncate call objects to limit the number of arguments

update_current_test

Update current test if unit test expression has progressed

value

Retrieve the value from an object

zero_coverage

Provide locations of zero coverage

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 code.

  • Maintainer: Jim Hester
  • License: MIT + file LICENSE
  • Last published: 2025-11-09