How to see code coverage percentage in VS22 Enterprise?

Micha Vosse 26 Reputation points
2022-12-09T09:56:17.903+00:00

Hey,

we're moving from VS2019 Enterprise to VS22 Enterprise. In 2019 the code coverage looks like described here: https://video2.skills-academy.com/en-us/visualstudio/test/using-code-coverage-to-determine-how-much-code-is-being-tested?view=vs-2022&tabs=csharp#analyze-code-coverage so we have a table with these columns:

  • Hierarchy
  • Not Covered (Blocks)
  • Not Covered (% Blocks)
  • Covered (Blocks)
  • Covered (% Blocks)

In VS22 we get these columns:

  • Hierarchy
  • Covered (Blocks)
  • Not Covered (Blocks)
  • Covered (Lines)
  • Partially Covered (Lines)
  • Not Covered (Lines)

So the percentage values are not shown anymore. Is there a way to show them again?

Thanks

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,827 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
336 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 28,951 Reputation points Microsoft Vendor
    2022-12-09T12:01:53.587+00:00

    Hi @Micha Vosse ,

    Welcome to Microsoft Q&A forum.

    Please right-click one of the columns and select Add/Remove Columns… > then select to add the columns which you want.

    268944-image.png

    268945-image.png

    268926-image.png

    Best Regards,
    Tianyu

    • If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    4 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Hoekstra Jelle 491 Reputation points
    2022-12-09T10:07:32.113+00:00

    Hii,

    In the pictures in that link (https://video2.skills-academy.com/en-us/visualstudio/test/using-code-coverage-to-determine-how-much-code-is-being-tested?view=vs-2022&tabs=csharp)
    I do see code coverage % and not covered %.
    The link you're viewing (the one I confirmed above) is actually the vs 2022 link.

    Hope this clarifies things. If you need any further help, please do share a screenshot of what you see in both versions of the IDE

    ----------

    If this helps, please accept the answer and upvote.