> ## Documentation Index
> Fetch the complete documentation index at: https://docs.testdino.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Playwright Test Run Code Coverage View

> View per-run code coverage metrics and file-level breakdowns.

The Coverage tab shows how much of your application code ran during a test run. It displays four overall metrics and a file-by-file breakdown so you can find exactly which parts of your code are untested.

<Warning>
  **Warning**

  This tab only appears when the `@testdino/playwright` streaming reporter (Experimental) has `coverage.enabled: true` and your application is instrumented with Istanbul. See the [Code Coverage guide](/guides/playwright-code-coverage) for full setup instructions.
</Warning>

## Coverage Badge

Runs with coverage data display a coverage badge on the [Test Runs](/platform/playwright-test-runs) list. The badge shows the overall statement coverage percentage, giving an at-a-glance indicator without opening the run.

| Badge color | Statement coverage |
| :---------- | :----------------- |
| Green       | 80% and above      |
| Yellow      | 50% to 79%         |
| Red         | Below 50%          |

## Coverage Summary

<img src="https://tdstorageus.blob.core.windows.net/public/docs/debug-and-analyze/test-runs/coverage/summary.webp" alt="Coverage summary showing statement, branch, function, and line coverage metrics" />

Four tiles at the top of the tab show the overall coverage for the run:

| Metric         | What it means                                                        |
| :------------- | :------------------------------------------------------------------- |
| **Statements** | How many individual code statements ran during tests                 |
| **Branches**   | How many `if`/`else` paths were taken (both the true and false side) |
| **Functions**  | How many functions were called at least once                         |
| **Lines**      | How many source lines ran during tests                               |

## Coverage by File

A table showing coverage metrics for every source file in the report. Each row displays statements, branches, functions, and lines percentages. Sort by any column to find the files with the lowest coverage.

Two view modes are available using the toggle in the top-right corner of the table:

### List View

<img src="https://tdstorageus.blob.core.windows.net/public/docs/debug-and-analyze/test-runs/coverage/list-view.webp" alt="Coverage list view showing per-file coverage percentages" />

A flat list of all source files with their coverage percentages. Each file shows its full path relative to the project root.

### Tree View

<img src="https://tdstorageus.blob.core.windows.net/public/docs/debug-and-analyze/test-runs/coverage/hierarchy-view.webp" alt="Coverage tree view showing files grouped by directory with aggregate coverage" />

Files grouped by directory structure. Expand or collapse folders to drill into specific areas of your codebase. Each folder row shows the aggregate coverage for all files inside it. Use **Expand All** and **Collapse All** to control the tree.

## Coverage Diff

The diff view compares coverage between the current run and a baseline. It highlights files where coverage increased or decreased, making it easy to spot regressions introduced by a specific change.

| Column       | Description                                                    |
| :----------- | :------------------------------------------------------------- |
| **File**     | Source file path                                               |
| **Current**  | Coverage percentage in this run                                |
| **Baseline** | Coverage percentage from the comparison run                    |
| **Change**   | Difference between current and baseline (positive or negative) |

The baseline defaults to the previous run on the same branch. For pull request runs, the baseline is the latest run on the target branch.

<Tip>
  **Tip**

  Use the diff view during code review to confirm that new code includes adequate test coverage before merging.
</Tip>

## Related

<CardGroup cols={2}>
  <Card title="Code Coverage Guide" icon="chart-bar" href="/guides/playwright-code-coverage">
    Set up instrumentation and coverage collection
  </Card>

  <Card title="Coverage Trend" icon="chart-line" href="/platform/playwright-test-analytics#performance">
    Track coverage trends across runs
  </Card>

  <Card title="Summary" icon="chart-pie" href="/platform/test-runs/playwright-failure-summary">
    Group failures and flakiness by cause
  </Card>

  <Card title="Specs" icon="file-lines" href="/platform/playwright-test-runs/specs">
    Review results by spec file
  </Card>
</CardGroup>
