Moles对NCover的支持 [英] NCover support with Moles

查看:120
本文介绍了Moles对NCover的支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的项目中,我们使用NCover来衡量代码覆盖率.如果我们测量使用Moles的测试,则不会测量这些类的代码覆盖率(0%). 这与使用.NET分析器的Moles和NCover有关. 在Internet上进行一些搜索后,我在命令提示符下尝试了以下操作,但没有任何结果:

In our project we use NCover to measure our code coverage. If we measure tests which uses Moles the code coverage for those classes are not measured (0%). This has something to do with both Moles and NCover using the .NET profiler. After some searching on the internet I tried the following in command prompt without any result:

set COR_PROFILER={3FB1CC1E-1C17-4A37-9C18-BF3DB8F10E46} moles.runner.exe /pi:Dispatch /r:"C:\Program Files\NCover\NCover.Console.exe" "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /args:/testcontainer:..\Bin\TestLib.dll"

COR_PROFILER后面的数字是我先前在regsvr中注册的NCover.Lib.x86.dll GUID.另外,将COR_ENABLE_PROFILING=1添加为env.var也无济于事.

The number behind the COR_PROFILER is the NCover.Lib.x86.dll GUID which I previously registered with regsvr. Also adding COR_ENABLE_PROFILING=1 as env.var doesn't help.

是否有人可以使用此探查器链接或具有.NET探查器链接的经验?

Is there anyone who got this profiler chaining working or has experience with .NET profiler chaining?

推荐答案

我在至少一个简单的使用Moles上下文的简单示例中挖掘并找到了一种使用NCover的方法.查看此线程: http://www.ncover.com/forum/show_topic?id= 1191

I dug around and found a way to use NCover in at least one simple example using Moles context. Check out this thread: http://www.ncover.com/forum/show_topic?id=1191

这篇关于Moles对NCover的支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆