> ## 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

> Review code coverage for a test run: the summary badge, overall metrics, a file-by-file table, and the coverage diff.

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

<Warning>
  **Warning**

  Coverage data is only collected when the `@testdino/playwright` streaming reporter (Experimental) has `coverage.enabled: true`, your test files import `test` from `@testdino/playwright`, and your application is instrumented with Istanbul. A run without coverage still has a Coverage tab, but it shows a **No Coverage Data Yet** checklist with the 3 setup steps and an **Open setup guide** link instead of a report. 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" />

The **Coverage Overview** card shows 4 tiles with the overall coverage for the run. Each tile shows the percentage, a fill bar, and the covered count out of the total (for example, `54 of 61 covered`). Tiles use the same colors as the badge: green at 80% and above, amber from 50% to 79%, red below 50%.

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

The card header lists the number of files in the report and the instrumentation tool (for example, `Istanbul`). Sharded runs that were combined into 1 report show a **Shards merged** badge. If a shard never sent its coverage, a **Partial report** notice appears above the tiles and the numbers understate real coverage.

## Coverage by File

The **Files** card lists every file that ran during the test run. Each row displays statements, branches, functions, and lines percentages, colored on the same scale as the summary tiles. Click a column header to sort and find the files with the lowest coverage.

2 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. Paths are shortened to start at `src/`, `lib/`, `app/`, or `components/` where possible, with the directory dimmed and the file name in full contrast. Hover over a path to see the full path.

### 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. All folders start expanded; a single button toggles between **Collapse all** and **Expand all**.

## 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>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.