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?

Universal Windows Platform (UWP)
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.
337 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 27,891 Reputation points Microsoft Vendor
    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