For a standard CSharp/UWP App, is there a good way to measure Unitest code coverage? It looks like Visual Studio tools do not apply for UWP. My end goal is to get an objective measurement for how thorough our testing is, and to watch for regressions on coverage.
I have gotten code coverage to work for the following configuration, using VS2015:
If you can minimize the amount of code in your UWP app project (e.g., by using the MVVM pattern), then most of your tests will be against the PCL. Since code coverage works against a .NET Standard library set up as shown, your numbers will be fairly accurate even if you can't measure coverage against the UWP app project itself.
(Of course, this is more practical for new apps than existing apps, since it requires a particular design).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With