Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Analyze Code Coverage" option missing in Visual Studio 2017 Professional

enter image description here

Is any options available to enable options in "Test->Analyze Code Coverage"? Is another way to run the code coverage result?

like image 926
Ayyappan Sekaran Avatar asked Nov 01 '18 06:11

Ayyappan Sekaran


People also ask

How do I check code coverage in Visual Studio Professional?

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.

How do I open a Visual Studio code coverage file?

In Visual Studio, click File > Open > File, navigate to the output directory of the solution, and select and open the run. coverage file.


2 Answers

Code Coverage is an Enterprise Edition feature, not available in Professional.

Credits: @Damien_The_Unbeliever. Thanks for you answer in comments. Its helped me.

like image 92
Ayyappan Sekaran Avatar answered Sep 24 '22 03:09

Ayyappan Sekaran


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

like image 31
EricBDev Avatar answered Sep 22 '22 03:09

EricBDev