Ways to use covr

  • devtools::test_coverage_active_file(): For exploring the coverage of an individual file.

  • devtools::test_coverage(): For exploring the coverage of the whole package.

  • usethis::use_github_action("test-coverage"): Configures a GitHub Actions (GHA) workflow that constantly monitors your test coverage. This is very useful before merging pull requests.