Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is that possible to use Visual Studio Code Coverage without Unit Testing?

Is that possible to use Visual Studio Code Coverage without Unit Testing? I would like to make a coverage analysis within a normal program execution.

UPDATE:

There are no current solutions to use the Visual Studio Coverage tooling for what I want, although dotCover seems to be a nice third part solution for the problem.

like image 994
Vinicius Rocha Avatar asked Feb 01 '12 18:02

Vinicius Rocha


People also ask

Does Visual Studio code have code coverage?

Code coverage is a measurement of how many lines of code are executed when a unit test suite is executed. One of the most popular code coverage tools is the Visual Studio code coverage feature that comes with an enterprise flavor.

Is code coverage same as unit testing?

Unit tests help to ensure functionality and provide a means of verification for refactoring efforts. Code coverage is a measurement of the amount of code that is run by unit tests - either lines, branches, or methods.

Which tool is used for code coverage?

Code coverage tools are available for many programming languages and as part of many popular QA tools. They are integrated with build tools like Ant, Maven, and Gradle, with CI tools like Jenkins, project management tools like Jira, and a host of other tools that make up the software development toolset.


1 Answers

Here's a more detailed answer rather than just a link:

To do this for already instrumented files with an IIS Express application: Get the name of the site from C:\Users\<your user>\Documents\IISExpress\config\applicationhost.config

vsperfcmd /start:coverage /output:run.coverage

launch your app run your manual tests then to finish

vsperfcmd /shutdown

from related question https://stackoverflow.com/a/23791306/57883

for a full walk through, here's a link to the blog article I just posted on it:

http://imaginarydevelopment.blogspot.com/2015/02/get-code-coverage-from-vs-without.html

like image 186
Maslow Avatar answered Nov 12 '22 17:11

Maslow