uwp code coverage does not take effect

华 张 156 Reputation points
2022-12-01T14:09:32.343+00:00

I created a UWP project and then created a UWP Unit Test. Running all tests is normal, but Analyze Code Coverage for All Tests is invalid and the result is 0

266180-image.png

266169-image.png

What can I do?

Developer technologies | Universal Windows Platform (UWP)
Developer technologies | Visual Studio | Testing
0 comments No comments
{count} votes

Answer accepted by question author
  1. Anna Xiu-MSFT 31,151 Reputation points Microsoft External Staff
    2022-12-02T03:38:20.557+00:00

    Hi @华 张 ,

    Welcome to Microsoft Q&A!

    Code coverage is not supported for UWP unit tests currently. It has been reported to product team:
    https://developercommunity.visualstudio.com/t/support-code-coverage-for-universal-apps-uwp-windo/578972

    If you have any suggestion about the feature, you can vote and add comments in that ticket.

    Thank you for helping us build a better Visual Studio!

    Sincerely,
    Anna
    *
    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.


0 additional answers

Sort by: Most 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.