You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/test/using-code-coverage-to-determine-how-much-code-is-being-tested.md
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Code coverage testing
3
3
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.
4
4
5
5
ms.custom: SEO-VS-2020, devdivchpfy22
6
-
ms.date: 06/26/2022
6
+
ms.date: 12/21/2022
7
7
ms.topic: conceptual
8
8
helpviewer_keywords:
9
9
- code coverage
@@ -73,6 +73,20 @@ You can also have the results displayed for lines by choosing **Add/Remove Colum
73
73
> [!TIP]
74
74
> 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.
75
75
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
+
76
90
## Manage code coverage results
77
91
78
92
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