Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable code coverage in VS 2010 ultimate

This may seem a bit stupid, but I can't find the answer so:
My team just moved to VS2010 ultimate, and we'd like to enable code coverage. All the instructions I've found mention to open the Local.testsettings file and go to the "Execution Criteria" tab.
Well, I don't have this tab, and I do have VS2010 ultimate, which is supposed to support code coverage.

Help please :)

Noa

like image 496
Noich Avatar asked Jan 24 '11 14:01

Noich


People also ask

How do I enable code coverage in Visual Studio?

Starting in Visual Studio 2022 Update 2, you can enable faster code coverage test results by selecting Tools > Options > Environment > Preview Features, then selecting Code coverage experience improvements, and then restarting Visual Studio.

Does Visual Studio code have code coverage?

Live Unit Testing automatically runs any impacted unit tests in the background and shows your code coverage live in Visual Studio.

How do I add code coverage to Runsettings?

You can enable this in runsettings by adding <Format>Cobertura</Format> or <Format>Xml</Format> in the DataCollector configuration section in your runsettings file. This format can be viewed in the code coverage results window in Visual Studio Enterprise.


1 Answers

Screenshot for the Test Settings Dialog

Do not forget about Button 'Configure' !!!

  1. Select Test/Edit Test settings/your active settings/

  2. Select Tab Data & Diagnostics,

  3. Select the row Code Coverage

  4. Check Enabled

  5. Click the small Configure symbol on top of the grid.

  6. Check all assemblies you want to collect code coverage info from...

like image 113
alerya Avatar answered Sep 23 '22 00:09

alerya