How can I generate a code coverage report with Visual Studio 2012 and NUnit command line tool

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

Using Visual Studio 2012 (Ultimate) and NUnit 2.6.2, how can I analyze coverage when running NUnit (nunit-console) on the command line? It seems that Visual Studio is able to analyze coverage when NUnit runs tests within Visual Studio, but I need to know how to do this on the command line as well.

Answers

http://msdn.microsoft.com/en-us/library/vstudio/jj155796.aspx http://msdn.microsoft.com/en-us/library/vstudio/jj155796.aspx

"C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDECommonExtensionsMicrosoftTestWindowvstest.console.exe" /UseVsixExtensions:true /EnableCodeCoverage "C:UsersArveDocumentsVisual Studio 2012ProjectsMyAppMyApp.Tests�inDebugMyApp.Tests.dll"

The above command produces a a file with the suffix .coverage beneath the directory TestResults .

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/14438099/how-can-i-generate-a-code-coverage-report-with-visual-studio-2012-and-nunit-comm

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils