{"id":248182,"date":"2024-03-04T05:48:39","date_gmt":"2024-03-04T13:48:39","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=248182"},"modified":"2024-03-05T01:57:15","modified_gmt":"2024-03-05T09:57:15","slug":"code-coverage-features-in-visual-studio-enterprise","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/code-coverage-features-in-visual-studio-enterprise\/","title":{"rendered":"Code coverage features in Visual Studio Enterprise"},"content":{"rendered":"<p><span data-contrast=\"auto\">By using code coverage, you can find out where your testing needs improvement and make your software more robust and dependable. In this post, we will introduce the new features that we introduced to the Code Coverage Results window in Visual Studio Enterprise 2022. These features are:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<ul>\n<li data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"none\">Support of additional report formats<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:1020,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;335559795&quot;:300}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"none\">Enhanced report merging<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:1020,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;335559795&quot;:300}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"none\">Performance enhancements<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:1020,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;335559795&quot;:300}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"none\">Code coverage views<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:1020,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;335559795&quot;:300}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"none\">These features are not available in Professional or Community editions of Visual Studio.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"1\"><span data-contrast=\"none\">Support of additional report formats<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"none\">We now support additional formats for coverage reports. The formats that are supported are as follows:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<ul>\n<li data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"none\">Binary (default):<\/span><\/b><span data-contrast=\"none\"> .coverage (Microsoft special binary format)<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:1020,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;335559795&quot;:300}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"none\">Cobertura:<\/span><\/b><span data-contrast=\"none\"> .cobertura.xml (Java code coverage tool XML format)<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:1020,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;335559795&quot;:300}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"none\">XML:<\/span><\/b><span data-contrast=\"none\"> .xml (Microsoft XML format)<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:1020,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;335559795&quot;:300}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"none\">CoverageXml:<\/span><\/b><span data-contrast=\"none\"> .coveragexml (Microsoft XML format)<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:1020,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;335559795&quot;:300}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"none\">A <\/span><span data-contrast=\"auto\">coverage <\/span><span data-contrast=\"none\">report can also be changed to other formats that are supported. <\/span><a href=\"https:\/\/github.com\/microsoft\/codecoverage\/blob\/main\/samples\/VisualStudio\/scenarios\/scenario02\/README.md\"><span data-contrast=\"none\">Example<\/span><\/a><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"1\"><span data-contrast=\"none\">Improved Report Merging<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">We have changed how we merge reports. Now we combine projects in reports if they use the same source code. For example, if a project is targeting different frameworks, the merged report will have only one item for the project with the coverage data added together.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 50%; text-align: left;\"><strong>Visual Studio Enterprise 17.5\u00a0<\/strong><\/td>\n<td style=\"width: 50%; text-align: left;\"><strong>Visual Studio Enterprise 17.9\u00a0<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\"><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/old-merge.png\"><img decoding=\"async\" class=\"alignnone wp-image-248185 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/old-merge.png\" alt=\"Image old merge\" width=\"731\" height=\"225\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/old-merge.png 731w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/old-merge-300x92.png 300w\" sizes=\"(max-width: 731px) 100vw, 731px\" \/><\/a><\/td>\n<td style=\"width: 50%;\"><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\"><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/new-merge.png\"><img decoding=\"async\" class=\"alignnone wp-image-248186 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/new-merge.png\" alt=\"Image new merge\" width=\"731\" height=\"225\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/new-merge.png 731w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/new-merge-300x92.png 300w\" sizes=\"(max-width: 731px) 100vw, 731px\" \/><\/a><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span data-contrast=\"auto\">See <\/span><a href=\"https:\/\/github.com\/microsoft\/codecoverage\/blob\/main\/samples\/VisualStudio\/scenarios\/scenario03\/README.md\"><span data-contrast=\"none\">merge repots scenario<\/span><\/a><span data-contrast=\"auto\"> for a full example.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"1\"><span data-contrast=\"none\">Performance Enhancements<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"none\">Coverage report operations have become faster over time. With the latest version of Visual Studio Enterprise Version, report merging and opening is significantly faster.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">The table shows how long it takes to open a report in different versions of Visual Studio.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<table style=\"width: 99.9024%;\" data-tablestyle=\"MsoTableGrid\" data-tablelook=\"1696\" aria-rowcount=\"5\">\n<tbody>\n<tr aria-rowindex=\"1\">\n<td style=\"width: 64.9315%;\" data-celllook=\"0\"><strong>Visual Studio Enterprise Version<\/strong><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 22.7397%;\" data-celllook=\"0\"><strong>Time (sec)<\/strong><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 260.953%;\" data-celllook=\"0\"><strong>Ratio<\/strong><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"2\">\n<td style=\"width: 64.9315%;\" data-celllook=\"0\"><span data-contrast=\"none\">16.5<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 22.7397%;\" data-celllook=\"0\"><span data-contrast=\"none\">54<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 260.953%;\" data-celllook=\"0\"><span data-contrast=\"none\">1.00<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"3\">\n<td style=\"width: 64.9315%;\" data-celllook=\"0\"><span data-contrast=\"none\">17.0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 22.7397%;\" data-celllook=\"0\"><span data-contrast=\"none\">42<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 260.953%;\" data-celllook=\"0\"><span data-contrast=\"none\">0.77<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"4\">\n<td style=\"width: 64.9315%;\" data-celllook=\"0\"><span data-contrast=\"none\">17.5<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 22.7397%;\" data-celllook=\"0\"><span data-contrast=\"none\">11<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 260.953%;\" data-celllook=\"0\"><span data-contrast=\"none\">0.20<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"5\">\n<td style=\"width: 64.9315%;\" data-celllook=\"0\"><span data-contrast=\"none\">17.9<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 22.7397%;\" data-celllook=\"0\"><span data-contrast=\"none\">5<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 260.953%;\" data-celllook=\"0\"><span data-contrast=\"none\">0.09<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span data-contrast=\"auto\">And for report merging<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<table style=\"width: 99.9918%;\" data-tablestyle=\"MsoTableGrid\" data-tablelook=\"1696\" aria-rowcount=\"4\">\n<tbody>\n<tr aria-rowindex=\"1\">\n<td style=\"width: 64.9315%;\" data-celllook=\"0\"><strong>Visual Studio Enterprise Version\u00a0<\/strong><\/td>\n<td style=\"width: 22.7397%;\" data-celllook=\"0\"><strong>Time (sec)\u00a0<\/strong><\/td>\n<td style=\"width: 272.092%;\" data-celllook=\"0\"><strong>Ratio\u00a0<\/strong><\/td>\n<\/tr>\n<tr aria-rowindex=\"2\">\n<td style=\"width: 64.9315%;\" data-celllook=\"0\"><span data-contrast=\"none\">17.0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 22.7397%;\" data-celllook=\"0\"><span data-contrast=\"none\">47<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 272.092%;\" data-celllook=\"0\"><span data-contrast=\"none\">1.00<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"3\">\n<td style=\"width: 64.9315%;\" data-celllook=\"0\"><span data-contrast=\"none\">17.5<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 22.7397%;\" data-celllook=\"0\"><span data-contrast=\"none\">42<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 272.092%;\" data-celllook=\"0\"><span data-contrast=\"none\">0.89<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"4\">\n<td style=\"width: 64.9315%;\" data-celllook=\"0\"><span data-contrast=\"none\">17.9<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 22.7397%;\" data-celllook=\"0\"><span data-contrast=\"none\">6<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 272.092%;\" data-celllook=\"0\"><span data-contrast=\"none\">0.12<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 aria-level=\"1\"><span data-contrast=\"none\">Coverage Views<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">New views have been added in the coverage window to view the coverage data in diverse ways. They provide different perspectives to visualize coverage data and improve developer&#8217;s experience.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"1\"><span data-contrast=\"none\">Margin Glyphs<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">We have introduced a new method of seeing coverage in the editor. Margin glyphs use solid rectangles in the margin to indicate covered lines, stripe rectangles to indicate partially covered lines, and open rectangles in the margin to indicate uncovered lines.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr aria-rowindex=\"1\">\n<td style=\"width: 49.9555%;\" data-celllook=\"0\"><strong>Line Coloring (default)\u00a0<\/strong><\/td>\n<td style=\"width: 70.6144%;\" data-celllook=\"0\"><strong>Margin Glyphs\u00a0<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 49.9555%;\"><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\"><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/line-coloring.png\"><img decoding=\"async\" class=\"alignnone wp-image-248187 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/line-coloring.png\" alt=\"Image line coloring\" width=\"556\" height=\"506\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/line-coloring.png 556w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/line-coloring-300x273.png 300w\" sizes=\"(max-width: 556px) 100vw, 556px\" \/><\/a><\/span><\/td>\n<td style=\"width: 70.6144%;\"><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\"><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/margin-glyphs.png\"><img decoding=\"async\" class=\"alignnone wp-image-248188 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/margin-glyphs.png\" alt=\"Image margin glyphs\" width=\"556\" height=\"506\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/margin-glyphs.png 556w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/margin-glyphs-300x273.png 300w\" sizes=\"(max-width: 556px) 100vw, 556px\" \/><\/a><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-size: 1rem; text-align: var(--bs-body-text-align);\" data-contrast=\"none\">Visit <\/span><a style=\"font-size: 1rem; text-align: var(--bs-body-text-align); background-color: #f7f7f9;\" href=\"https:\/\/github.com\/microsoft\/codecoverage\/tree\/main\/samples\/VisualStudio\/scenarios\/scenario01#enable-code-coverage-coloring\"><span data-contrast=\"none\">example<\/span><\/a><span style=\"font-size: 1rem; text-align: var(--bs-body-text-align);\" data-contrast=\"none\"> to turn on different code coverage coloring.<\/span><span style=\"font-size: 1rem; text-align: var(--bs-body-text-align);\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"1\"><span data-contrast=\"none\">Source View<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Source View displays coverage data based on directory\/file structure rather than namespace\/class\/method structure. It merges coverage information at a file level.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">It is helpful when you have C++ code and unit test projects are using static libraries. For project view, each unit test project shows coverage only for the code run in their own tests. But source view combines coverage run for all test projects.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr aria-rowindex=\"1\">\n<td style=\"width: 49.9179%;\" data-celllook=\"0\"><strong>Project View (default)\u00a0<\/strong><\/td>\n<td style=\"width: 171.569%;\" data-celllook=\"0\"><strong>Source View<\/strong><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"2\">\n<td style=\"width: 49.9179%;\" data-celllook=\"0\"><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\"> <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/project-view-report-static.png\"><img decoding=\"async\" class=\"alignnone wp-image-248189 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/project-view-report-static.png\" alt=\"Image project view report static\" width=\"766\" height=\"546\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/project-view-report-static.png 766w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/project-view-report-static-300x214.png 300w\" sizes=\"(max-width: 766px) 100vw, 766px\" \/><\/a><\/span><\/td>\n<td style=\"width: 171.569%;\" data-celllook=\"0\"><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\"> <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/source-view-report-static.png\"><img decoding=\"async\" class=\"alignnone wp-image-248190 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/source-view-report-static.png\" alt=\"Image source view report static\" width=\"768\" height=\"407\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/source-view-report-static.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/source-view-report-static-300x159.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span data-contrast=\"none\">See <\/span><a href=\"https:\/\/github.com\/microsoft\/codecoverage\/blob\/main\/samples\/VisualStudio\/scenarios\/scenario04\/reportTypeView\/ReportTypeView.md\"><span data-contrast=\"none\">report type view<\/span><\/a><span data-contrast=\"none\"> for a complete sample.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"1\"><span data-contrast=\"none\">Changeset Report<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Changeset report filters the coverage report and shows coverage statistics only for the changes made in current local git branch. It helps developers to identify coverage status of their own changes and improve code coverage of new code.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 56px;\">\n<tbody>\n<tr aria-rowindex=\"1\">\n<td style=\"width: 50.3356%;\" data-celllook=\"0\"><strong>Full Report (default)\u00a0<\/strong><\/td>\n<td style=\"width: 402.646%;\" data-celllook=\"0\"><strong>Changeset Report\u00a0<\/strong><\/td>\n<\/tr>\n<tr aria-rowindex=\"2\">\n<td style=\"width: 50.3356%;\" data-celllook=\"0\"><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\"> <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/full-report.png\"><img decoding=\"async\" class=\"alignnone wp-image-248191 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/full-report.png\" alt=\"Image full report\" width=\"713\" height=\"1460\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/full-report.png 713w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/full-report-147x300.png 147w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/full-report-500x1024.png 500w\" sizes=\"(max-width: 713px) 100vw, 713px\" \/><\/a><\/span><\/td>\n<td style=\"width: 402.646%;\" data-celllook=\"0\"><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\"> <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/changeset-report.png\"><img decoding=\"async\" class=\"alignnone wp-image-248192 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/changeset-report.png\" alt=\"Image changeset report\" width=\"701\" height=\"1463\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/changeset-report.png 701w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/changeset-report-144x300.png 144w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/changeset-report-491x1024.png 491w\" sizes=\"(max-width: 701px) 100vw, 701px\" \/><\/a><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span data-contrast=\"none\">To see a complete example, look at the <\/span><a href=\"https:\/\/github.com\/microsoft\/codecoverage\/blob\/main\/samples\/VisualStudio\/scenarios\/scenario04\/reportContentView\/ReportContentView.md\"><span data-contrast=\"none\">report content view<\/span><\/a><span data-contrast=\"none\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"1\"><span data-contrast=\"none\">Search<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Search has been added to the code coverage results window. You can search using different search parameters to filter your report. For example, show methods where block coverage is less than 80%.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/search.png\"><img decoding=\"async\" class=\"alignnone wp-image-248193 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/search.png\" alt=\"Image search\" width=\"1002\" height=\"218\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/search.png 1002w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/search-300x65.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/03\/search-768x167.png 768w\" sizes=\"(max-width: 1002px) 100vw, 1002px\" \/><\/a><\/p>\n<p><span data-contrast=\"none\">To see more options, check out <\/span><a href=\"https:\/\/github.com\/microsoft\/codecoverage\/blob\/main\/samples\/VisualStudio\/scenarios\/scenario05\/README.md\"><span data-contrast=\"none\">search examples<\/span><\/a><span data-contrast=\"none\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">You can use any combination of views together. For example, you can display only the methods that have less than 80% block coverage in your current branch. The coverage windows and the code editor will show the filtered results.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h2><span data-contrast=\"none\">Summary\u202f<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">We are excited for you to use our new code coverage features. We believe that these features will help you in identifying and improving code coverage for your solution.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:240,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">We appreciate the time you have spent reporting issues\/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via\u202f<\/span><a href=\"https:\/\/developercommunity.visualstudio.com\/home%22%20\/t%20%22_blank\"><span data-contrast=\"none\">Developer Community<\/span><\/a><span data-contrast=\"auto\">: report any bugs or issues via\u202f<\/span><a href=\"https:\/\/learn.microsoft.com\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio?view=vs-2022\"><span data-contrast=\"none\">report a problem<\/span><\/a><span data-contrast=\"auto\">\u202fand\u202f<\/span><a href=\"https:\/\/developercommunity.microsoft.com\/VisualStudio\/suggest\"><span data-contrast=\"none\">share your suggestions<\/span><\/a><span data-contrast=\"auto\">\u202ffor new features or improvements to existing ones.\u202f\u202f<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:240,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Stay connected with the Visual Studio team by following us on <\/span><a href=\"https:\/\/www.youtube.com\/@visualstudio\"><span data-contrast=\"none\">YouTube<\/span><\/a><span data-contrast=\"auto\">, <\/span><a href=\"https:\/\/twitter.com\/VisualStudio\"><span data-contrast=\"none\">Twitter<\/span><\/a><span data-contrast=\"auto\">, <\/span><a href=\"https:\/\/www.linkedin.com\/showcase\/microsoft-visual-studio\/\"><span data-contrast=\"none\">LinkedIn<\/span><\/a><span data-contrast=\"auto\">, <\/span><a href=\"https:\/\/www.twitch.tv\/visualstudio\"><span data-contrast=\"none\">Twitch<\/span><\/a><span data-contrast=\"auto\"> and on <\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/?view=vs-2022\"><span data-contrast=\"none\">Microsoft Learn<\/span><\/a><span data-contrast=\"auto\">.\u202f<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:240,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By using code coverage, you can find out where your testing needs improvement and make your software more robust and dependable. In this post, we will introduce the new features that we introduced to the Code Coverage Results window in Visual Studio Enterprise 2022. These features are:\u00a0 Support of additional report formats\u00a0 Enhanced report merging\u00a0 [&hellip;]<\/p>\n","protected":false},"author":138176,"featured_media":248094,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6936,6868,1412,155],"tags":[],"class_list":["post-248182","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-coverage","category-performance","category-development","category-visual-studio"],"acf":[],"blog_post_summary":"<p>By using code coverage, you can find out where your testing needs improvement and make your software more robust and dependable. In this post, we will introduce the new features that we introduced to the Code Coverage Results window in Visual Studio Enterprise 2022. These features are:\u00a0 Support of additional report formats\u00a0 Enhanced report merging\u00a0 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/248182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/138176"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=248182"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/248182\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/248094"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=248182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=248182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=248182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}