Hinweis
The repository coverage overview is in Öffentliche Vorschau and subject to change.
Prerequisites
- Code Quality is enabled for your repository.
- Code coverage is configured for your repository. See Einrichten der Codeabdeckung für Ihr Repository.
Viewing code coverage
The Code coverage overview shows a snapshot of your repository's coverage at a glance, highlighting the current line coverage and trends over time.
- Navigieren Sie zur Security and quality Registerkarte Ihres Repositorys.
- Klicken Sie hier, um Codequalität zu erweitern, und klicken Sie dann auf Standardergebnisse.
- In the top right corner of the "Code coverage" score card, click View insights.
- To understand current coverage on your default branch, review the "Total line coverage" percentage:
- The line coverage percentage represents the number of lines covered by tests divided by the total number of executable lines, expressed as a percentage. If you upload multiple reports, each line is counted once. See How total line coverage is calculated.
- If a coverage goal is set, compare this percentage with the goal to see whether your coverage meets it.
- To see whether coverage is improving or declining over time, review the "Line coverage over time" line graph. Use the time period dropdown to select the last 14, 30, or 90 days.
- Optionally, to filter the results, use both the
languageandlabelfilters to select the coverage you want to review. You must use both filters. - To set a coverage goal, to the right of "Total line coverage", click and enter the desired percentage.
Next steps
To improve coverage in the files that need it most, use Copilot to write tests. See Testen von Code.