如何在控制台/命令行中使用NCover?
i've downloaded a free 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看看这个问题。
有两个免费版本的 NCover 可用: SourceForge 版本(该版本已停产,并且效果不佳,正如 Try 在 Ira Baxter 的回答显示)和 Gnoso 的(以前是免费的,在 1.5.8 版本之后已经商业化)。从此处获取后一个。
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.
万一它对其他人有帮助。我能够让 Nover 1.5.8(TestDriven.NET 附带的一个)与 nunit 很好地配合使用。
唯一的技巧是确保 CoverLib.dll COM 组件正确注册,
否则您会收到“Profiled Process Termminate”错误,然后确保我们将 /noshadow 参数传递给 nunit,否则 NCover 将无法加载程序集的符号(至少就我而言)。
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.
The only trick was to makes sure CoverLib.dll COM component is properly registered
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).
看看这个问题。
解决步骤
1.需要监控测试用例的执行情况Using ncover-console.exe
"[path]\NCover.Console.exe" "[path]\nunit-console.exe" "E:\Myapp\test.sln " /xml="[PATH]\TestResult.xml"
这将创建一个 .nccov 文件
2.使用 NCover.Reporting.exe 从 .nccov 文件创建覆盖率 html 报告
"[path]\NCover\NCover.Reporting.exe" " [路径]\coverage.nccov" //或 FullCoverageReport:Html:output
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