开发者

how to use NCover in console/command line?

i've downloaded a fre开发者_如何学Pythone version of ncover here -> http://sourceforge.net/projects/ncover/

but unortunately i am unable to find steps on how to use it in the command line.

any help would be great, thanks!


Have a look at this question.

There are two free versions of NCover available: The SourceForge one (which is discontinued and not working well as Try's comment on Ira Baxter's answer shows) and the Gnoso one (which used to be free and has gone commercial after version 1.5.8). Get the latter one from here.


In case it helps somebody else. I was able to get NCover 1.5.8 (one that comes with TestDriven.NET) working nicely with nunit.

NCover.Console.exe nunit-console-x86.exe /noshadow yourAssembly.dll 

The only trick was to makes sure CoverLib.dll COM component is properly registered

regsrv32 CoverLib.dll

Otherwise you'd get "Profiled Process Terminated" error, and then making sure we are passing /noshadow parameter to nunit, otherwise NCover would fail to load symbols for the assembly (at least in my case).


Have a look at this question.

Steps to solve

1.Need to monitor the execution of Test cases Using ncover-console.exe

"[path]\NCover.Console.exe" "[path]\nunit- console.exe" "E:\Myapp\test.sln" /xml="[PATH]\TestResult.xml"

This will create a .nccov file

2.Create coverage html report from .nccov file using NCover.Reporting.exe

"[path]\NCover\NCover.Reporting.exe" "[path]\coverage.nccov" //or FullCoverageReport:Html:output

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜