Is any options available to enable options in "Test->Analyze Code Coverage"? Is another way to run the code coverage result?
On the Test menu, select Analyze Code Coverage for All Tests. You can also run code coverage from the Test Explorer tool window. Show Code Coverage Coloring in the Code Coverage Results window. By default, code that is covered by tests is highlighted in light blue.
In Visual Studio, click File > Open > File, navigate to the output directory of the solution, and select and open the run. coverage file.
Code Coverage is an Enterprise Edition feature, not available in Professional.
Credits: @Damien_The_Unbeliever. Thanks for you answer in comments. Its helped me.
simple code coverage statistics can be generated using the dotnet test command
dotnet test myTestProject.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
The opencover tool exists also as extension to visual studio https://marketplace.visualstudio.com/items?itemName=FortuneNgwenya.FineCodeCoverage
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