Skip to content

Understanding and Using Codecov

Suhaani Agarwal edited this page Aug 2, 2025 · 1 revision

Codecov is an automated code coverage reporting tool integrated with our GitHub repository. It provides detailed insights into which parts of our codebase are covered by tests — across both R and JavaScript files.


Navigating the Codecov Dashboard

The coverage for the master branch (and all other branches) is shown here:
Codecov Dashboard – animint2 image

File Explorer

  • Scroll down to access the File Explorer view.
  • This section shows all R and JS files along with their individual coverage percentages.
  • Clicking on a specific file will open a view that highlights:
    • ✅ Lines covered by tests.
    • ❌ Lines missed by tests.

This makes it easy to identify untested code.


Branch-specific Coverage

You can change the selected branch at the top of the dashboard to view its test coverage.

For each branch, Codecov provides:

  • Overall project coverage %
  • File-by-file coverage
  • Per-line insights on what's tested vs. what's not

Use this to assess how much your changes impact test coverage.


Pull Requests and Codecov Comments

Whenever you open a Pull Request, Codecov automatically:

  1. Analyzes the diff and overall coverage changes.
  2. Posts a comment in the PR with:
    • Whether coverage increased or decreased
    • Which files were affected
    • Line-level insights (newly missed or covered lines)

for example:

image

How to Use This:

  • Look at the Codecov PR comment.
  • Identify the missing lines or files with poor coverage.
  • Try writing tests that hit those lines.
  • Commit your test — Codecov will re-run and update the coverage comment automatically.
  • Observe how much your test increased coverage.

Summary

Codecov is a feedback loop for test coverage:

  • Use it to find gaps in testing.
  • Write targeted tests for missed lines.
  • Monitor progress as coverage improves with each commit.
Clone this wiki locally