Tests and coverage — Show in screenshot under Code — Show in screenshot shows stored measurements and starts new coverage runs. The trend helps identify changes; a run’s detail leads to the participating test projects and poorly covered types. These views help locate areas of a workspace that need additional tests.
The coverage trend
The chart shows line coverage over the last 30 days. Each day uses its latest full run. Days without a full run have no data point.
With a workspace selected, the trend applies to that workspace. Without a selection, it shows up to four workspaces with the most full coverage runs in the period.
The trend uses the insights store. It includes completed measurements from the UI, codecharter coverage through the host and the MCP tool run_coverage. Unrecorded runs are absent. An unavailable or unreachable store is identified separately.
Investigate a coverage drop:
- Select the workspace and compare the chart’s period with the Coverage runs — Show in screenshot table.
- Open the relevant run through its time. Check the branch and badges before comparing measurements.
- Inspect Test projects — Show in screenshot and Least covered types — Show in screenshot. A type name leads to the code area with its metrics and findings.
- After adding tests, start a new coverage measurement and compare the full run with the previous state.
Coverage runs
The table lists stored runs, newest first.
| Column | Meaning |
|---|---|
| Time — Show in screenshot | Time of the measurement; opens the coverage detail. |
| Workspace | Associates the run with a workspace. The column appears when viewing multiple workspaces. |
| Branch — Show in screenshot | Git branch on which the measurement ran. |
| Lines — Show in screenshot | Share of coverable lines executed by tests. |
| Branches — Show in screenshot | Share of branches executed by tests. |
| Diff — Show in screenshot | Test coverage of changed lines when a change comparison is available. |
| Tests — Show in screenshot | Total number of tests in the run. |
| Failed — Show in screenshot | Number of tests with a failed result. |
| Run — Show in screenshot | Opens the associated host run when one exists. |
The coverage kinds section explains how to interpret measurements and missing values.
More runs can be loaded. An empty list offers Run coverage when a workspace is selected. Alternatively, codecharter coverage starts a measurement from the terminal.
Partial and old files
| Badge | Meaning |
|---|---|
| partial | Only test projects affected by a change ran. The values describe that subset. |
| old files | The run read existing, older coverage files without executing tests. Values may differ from the current code. The tooltip gives the file date. |
A run can carry both badges. These runs remain in the table for reference but do not contribute to the trend chart. Hotspot scores and type pages use the latest full run.
For unexpected changes, comparing badges and measurement times helps establish context. A new full measurement provides a comparable workspace result again.
Line, branch and diff coverage
All coverage values belong to a stored run. Its branch, time and badges determine which code and test projects contributed to the measurement.
| Metric | Scope in this view | Use |
|---|---|---|
| Line coverage | Measurement from the run; the trend chart uses only the latest full run per day. | Compare the trend with an individual measurement. |
| Branch coverage — Show in screenshot | Branch coverage from the same run. | Inspect alongside line coverage in the run detail. |
| Diff coverage | Coverage of changed lines from this run’s change comparison. The value can be absent without such a comparison. | Assess the measurement for a specific change. |
A dash means not measured. The measurement scope also determines which runs update values on type pages and in risk hotspots.
One coverage run in detail
The detail page identifies the workspace, branch and time of the measurement. Badges and explanations show whether partial measurements or older files limit its relevance.
The cards lead from the overall result to affected projects and types:
| Area | Display and use |
|---|---|
| Test result | Total, passed, failed and skipped tests for this run. |
| Test projects — Show in screenshot | The same counts per project, identifying which test suite contributed to the result. |
| Least covered types — Show in screenshot | The ten types with the lowest line coverage, including covered lines such as “12 of 40”. A type name opens its detail page. |
| Risk hotspots — Show in screenshot | Combines coverage with complexity, coupling and findings to prioritize further testing. |
Coverage run not found means the ID is absent from the insights store, for example after retention has removed it.
Run coverage
A measurement starts from the UI in three steps:
- Select a workspace in the header.
- Open Run coverage and check the target workspace in the dialog.
- Confirm the start. Progress follows the run; its result then appears in the table.
The command is equivalent to codecharter coverage and executes the workspace's tests. Duration depends on the test suite. It does not require a solution loaded in the host.
The host requests confirmation before every coverage measurement. A command is rejected explains rejected starts.