Skip to content

Commit ad19530

Browse files
authored
Merge pull request #10754 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/visualstudio-docs (branch main)
2 parents 689068d + 4308a2f commit ad19530

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/test/using-code-coverage-to-determine-how-much-code-is-being-tested.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Code coverage testing
33
description: Learn how to use the code coverage feature of Visual Studio to determine what proportion of your project code is being tested by coded tests.
44

55
ms.custom: SEO-VS-2020, devdivchpfy22
6-
ms.date: 06/26/2022
6+
ms.date: 12/21/2022
77
ms.topic: conceptual
88
helpviewer_keywords:
99
- code coverage
@@ -73,6 +73,20 @@ You can also have the results displayed for lines by choosing **Add/Remove Colum
7373
> [!TIP]
7474
> A line of code can contain more than one code block. If this is the case, and the test run exercises all the code blocks in the line, it is counted as one line. If some but not all code blocks in the line are exercised, it is counted as a partial line.
7575
76+
## Filter code coverage results
77+
78+
The **Code Coverage Results** window usually shows the result for the entire solution. The results can be filtered to show the results for only the files that have been updated in the current branch.
79+
80+
- **To view the changeset Report**, select the **Configure Code Coverage Views** icon in the **Code Coverage Results** window. Then select **Changeset Report** from the **Report Content** drop-down. Update the Active Repository and Base Branch to compare against for it to provide the comparison report.
81+
82+
From the search box in the **Code Coverage Results** window, there are several ways the report can be filtered.
83+
- To **Search by name** (Show only those which matches search string in the window), enter the search string in the search box.
84+
- To **Filter by type** enter the name of the type in the search box.
85+
- To **Show all** clear the search box.
86+
- To **Show 100% fully covered**, enter "Covered (%Lines)":"100" in the search box.
87+
- To **Show (>0% && < 100%) partially covered**, enter "Partially Covered (%Lines)":"<##" replacing the ## with the percentage covered.
88+
- To **Show 0% covered**, enter "Not Covered (%Lines)":"0" in the search box.
89+
7690
## Manage code coverage results
7791

7892
The **Code Coverage Results** window usually shows the result of the most recent run. The results will vary if you change your test data, or if you run only some of your tests each time.

0 commit comments

Comments
 (0)