Coverage Integration Guide
Connect Codecov, SonarCloud, or Datadog to Koalr: set up coverage dashboards, configure thresholds, track PR-level coverage delta, and correlate coverage with deploy risk.
Coverage Integration Guide
Most teams track coverage as a single aggregate number. Koalr goes further by tracking coverage delta on the specific files changed in each PR, attributing coverage impact per developer, and feeding coverage data into deploy risk scoring.
This guide walks you through connecting a coverage provider, understanding the coverage dashboard, setting thresholds, and using coverage as a deploy risk signal.
Time to complete: 10--15 minutes.
Supported providers
Koalr integrates with three coverage platforms:
| Provider | Best for | Key features |
|---|---|---|
| Codecov | Most teams. Market leader for GitHub-native coverage. | Line coverage, branch coverage, PR coverage delta, flags, LCOV/Istanbul/JaCoCo support. Free for public repos. |
| SonarCloud / SonarQube | Enterprise teams. | Line coverage, new code coverage, code smells, quality gates. The new_coverage metric (coverage on lines added in a branch) is a differentiator. Free for public repos. |
| Datadog CI Visibility | Teams already using Datadog. | Combines test results, coverage, and pipeline data in a single platform. Paid. |
You can connect multiple providers simultaneously. Koalr normalizes data into a unified model.
Step 1: Connect your coverage provider
- Navigate to Integrations in the left sidebar.
- Find your provider card (Codecov, SonarCloud, or Datadog) and click Connect.
- Follow the provider-specific authentication flow:
- Codecov: Enter your Codecov API token (found at codecov.io under Settings).
- SonarCloud: Enter your SonarCloud token (found under My Account then Security).
- Datadog: Enter your Datadog API and application keys.
- Koalr validates the credentials and begins syncing coverage data.
After connecting, navigate to Test Coverage in the left sidebar. If the integration is active, you will see the coverage dashboard. If no coverage provider is connected, the page shows a connection prompt listing all three providers.
Step 2: Understand the coverage dashboard
The coverage dashboard has three tabs:
Overview tab
The default view shows:
- Summary tiles -- Average coverage percentage, total tests, failing tests, and pass rate across all connected repositories.
- Coverage Trend chart -- A 30-day line chart of org-wide average coverage with an 80% target reference line (industry benchmark).
- Repository table -- Every connected repository with its line coverage percentage, branch coverage (if available), 30-day trend direction, test pass rate, and failing test count.
The summary tiles are color-coded:
- Green (80%+ coverage or 95%+ pass rate) -- healthy.
- Amber (60--79% coverage or below 95% pass rate) -- needs attention.
- Red (below 60% coverage) -- at risk.
PR Coverage Delta tab
This is the highest-value view. It shows:
- Total PRs Analyzed -- how many merged PRs had coverage data in the selected period.
- Avg Coverage Delta -- the average coverage change per PR. A positive delta means PRs are improving coverage on the files they touch.
- PRs That Dropped Coverage -- count and percentage of PRs that reduced coverage on their changed files.
- Biggest Coverage Drops -- a sortable table of PRs with the worst coverage impact, showing PR number, repository, author, and delta percentage.
- Biggest Coverage Improvements -- the PRs that improved coverage the most.
Use the period selector (7d, 14d, 30d, 60d, 90d) to adjust the analysis window.
By Developer tab
Shows coverage attribution per developer (requires Manager access or Full Transparency visibility mode):
- Top Improvers -- developers with the highest average positive coverage delta.
- Top Reducers -- developers whose PRs most frequently drop coverage.
- All Developers table -- every developer with their total PRs, average coverage delta, positive impact, negative impact, best PR, and worst PR.
This view is useful for identifying developers who consistently improve coverage and for coaching developers whose PRs regularly reduce it.
Step 3: Set coverage thresholds
Configure alerts and targets for your organization:
- Navigate to Integrations then find your coverage provider and click Settings.
- Configure:
- Org-wide minimum coverage -- repositories below this threshold appear in red on the dashboard. Default: 70%.
- PR coverage delta alert -- alert when a PR drops coverage by more than a configured percentage on changed files. Default: 5%.
- New code minimum (SonarCloud only) -- minimum coverage required on new lines of code added in a PR.
These thresholds drive the alerts described in Step 4.
Step 4: Configure coverage alerts
Set up Slack notifications for coverage events:
- Ensure Slack is connected (see Slack Setup).
- Navigate to Automations.
- Create rules for the events you care about:
- Coverage drop on PR -- notifies when a merged PR drops coverage on its changed files by more than the configured threshold.
- Repository below minimum -- notifies when a repository's overall coverage falls below your minimum threshold.
For more on threshold alerts, see Threshold Alerts.
Step 5: Understand how coverage feeds into deploy risk
Koalr integrates coverage data directly into deploy risk scoring through three signals:
-
Coverage delta on changed files (Tier 2, 7% weight) -- the specific files modified in a PR are checked for coverage. If coverage drops on those files, the PR receives a risk penalty. This is more predictive than overall repo coverage because it measures whether the code being changed right now is tested.
-
New code coverage (Tier 3, 5% weight) -- for SonarCloud users, coverage on lines that are new additions in the PR. New code with less than 60% coverage scores higher risk.
-
Test-to-code ratio (Tier 3, 4% weight) -- the ratio of test lines added to implementation lines added. PRs that add significant code without corresponding tests score higher risk.
These signals appear in the deploy risk breakdown for each PR. Engineers see exactly how coverage affects their risk score.
For the full list of deploy risk signals, see How Risk is Scored.
Step 6: Identify hotspot files
The coverage dashboard highlights uncovered hot paths -- files that are both high-churn (frequently modified) AND have low coverage. These are the highest-priority files to add tests to because they are changed often and have no safety net.
Cross-reference hotspot files with the Deploy Risk dashboard: PRs that modify hotspot files receive elevated risk scores. Improving coverage on these files has the highest return on investment for reducing deployment risk.
For more on hotspot detection, see Hotspot Detection.
Verification checklist
- Coverage provider shows Active under Integrations.
- Test Coverage dashboard loads with repository data.
- Summary tiles show average coverage, total tests, failing tests, and pass rate.
- Coverage Trend chart shows a 30-day history.
- PR Coverage Delta tab shows analyzed PRs (requires at least one merged PR with coverage data).
What to do next
- Set up deploy risk to see coverage signals in action on every PR. See Deploy Risk Setup Guide.
- Add coverage to your weekly report to track trends over time. See Weekly Engineering Report Guide.
- Review PR coverage delta weekly in your team sync to catch coverage regressions early.
- For the full feature reference, see Test Coverage and PR Coverage Delta.
Deploy Risk Setup Guide
Get deployment risk scoring running end-to-end: connect GitHub, understand your first risk scores, tune accuracy, enable GitHub Check Runs, and configure Slack alerts for high-risk deploys.
GitHub + CODEOWNERS Setup Guide
End-to-end walkthrough: connect GitHub, sync CODEOWNERS files, enable drift detection, turn on enforcement, and get Slack alerts when ownership rules are violated.