Share via

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://learn.microsoft.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

Developer technologies | Visual Studio | Testing
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

0 comments No comments

Answer accepted by question author

Tianyu Sun-MSFT 34,836 Reputation points Microsoft External Staff
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.

Was this answer helpful?

5 people found this answer helpful.

1 additional answer

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

    Hii,

    In the pictures in that link (https://learn.microsoft.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.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.