[英]How do I get TestDriven.net to generate a useful code coverage XML file with NCover?
Steps to Repro: Repro的步骤:
How do I get TestDriven.net to generate a useful code coverage XML file with NCover? 如何让TestDriven.net使用NCover生成有用的代码覆盖率XML文件?
So far, I've tried rebooting, uninstalling the RTM version and installing the Beta version, and running in Debug & Release modes. 到目前为止,我已尝试重新启动,卸载RTM版本并安装Beta版本,并在调试和发布模式下运行。
Update with Output window text: 使用输出窗口文本更新:
------ Test started: Assembly: TestProject1.dll ------
NCover v1.5.8 - Code Coverage Analysis for .NET - http://ncover.com
NCover.Console v1.5.8 - Code Coverage Analysis for .NET - http://ncover.org
Copyright (c) 2004-2006 Peter Waldschmidt
Command: C:\Program Files\TestDriven.NET 3\ProcessInvocation86.exe
Command Args: "/assemblyName:TestDriven.TestRunner.Server, Version=3.2.2770.0, Culture=neutral, PublicKeyToken=50ecb853f8c6b8d2" "/xmlName:M:TestDriven.TestRunner.Coverage.NCoverCoverageTestRunner.OutOfProc.Run(System.String,System.String,System.String,System.String,System.String)" "/parameter:tcp://127.0.0.1:64445/7dbdb535-3602-4a8e-8bbc-f8be7eb83987" "/parameter:tcp://127.0.0.1:64445/fbff4f73-2438-43e4-b1f9-2bdaeb9c0907" "/parameter:C:\Users\Zian\Documents\Visual Studio 2010\Projects\ClassLibrary1\TestProject1\bin\Debug\TestProject1.dll" "/parameter" "/parameter"
Working Directory:
Assemblies: ClassLibrary1;ClassLibrary1_Accessor;TestProject1
Coverage Xml: C:\Users\Zian\AppData\Local\Temp\Mutant Design\TestDriven.NET 2.0\Coverage\ClassLibrary1\TestProject1.xml
Coverage Log: Coverage.Log
Waiting for profiled application to connect...Connected
Configuring Profiler...
******************* Program Output *******************
Unable to establish communications with the profiler. (0x2)
NCover couldn't create a coverage report.
(Assuming you are using NCover 1.5.8 which ship with TDD.Net) (假设您使用的是与TDD.Net一起提供的NCover 1.5.8)
I've done exactly what you described, and it works just fine... Here are some things to consider: 我完全按照你的描述做了,它的工作正常......以下是一些需要考虑的事项:
C:\\Users\\USERNAME\\AppData\\Local\\Temp\\Mutant Design\\TestDriven.NET 2.0\\Coverage\\YOURPROJECT
, or use something like Everything (great free search tool) to find YourTestProject.xml
. C:\\Users\\USERNAME\\AppData\\Local\\Temp\\Mutant Design\\TestDriven.NET 2.0\\Coverage\\YOURPROJECT
,或使用像Everything (伟大的免费搜索工具)之类的东西来查找YourTestProject.xml
。 Perhaps there is a problem with the NCover GUI. EDIT: Try to follow the steps in this article . 编辑:尝试按照本文中的步骤操作。 There's a section called "NCover With TestDriven.NET".
有一个名为“NCover With TestDriven.NET”的部分。
It seems as NCover's profiler is not registered properly, so mainly what you have to do is remove it manually completely (TDD.Net probably doesn't do it for you), and only then reinstall it. 看起来NCover的探查器没有正确注册,所以主要是你需要做的就是完全手动删除(TDD.Net可能不会为你做),然后才重新安装它。
The 2 steps work because NCover's profiler is not registered properly, as described by KiwiDude . 这两个步骤有效,因为NCover的分析器未正确注册, 如KiwiDude所述 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.