问题在VS 2012 code覆盖 [英] Issue with Code Coverage in VS 2012

查看:270
本文介绍了问题在VS 2012 code覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的ASP.Net MVC 4应用程序有3个简单的测试。

I have a simple ASP.Net MVC 4 application with 3 simple tests.

每个这些试验的成功完成运行,然而code覆盖窗口给了我下面的错误:

Each of these tests run successfully to completion, however the Code Coverage window gives me the following error:

空的结果产生:没有二进制文件检测。确保测试运行,加载所需的二进制文件,有匹配符号文件,并通过自定义设置没有被排除在外。欲了解更多信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=253731

Empty results generated: No binaries were instrumented. Make sure the tests ran, required binaries were loaded, had matching symbol files, and were not excluded through custom settings. For more information see http://go.microsoft.com/fwlink/?LinkID=253731

我做了一些研究,但一切都没有解决我的问题是最新的。

I have done some research but nothing has resolved my problem to date.

  • 我知道测试运行
  • 我在相同的位置.pdb文件作为我的.dll文件
  • 在我没有optimsing由code
  • 在我找不到任何.testsettings文件
  • 在我还跑我的VS 2012最终以管理员身份,但没有运气。

如果我找到.coverage文件,所有它的是:

If I find the .coverage file, all it has in it is:

PCHÿ

不是XMLS结果或错误信息,我期待着。

Not the xmls results or error message I am expecting.

推荐答案

如果你不能让你删除的*文件名为.suo,请检查您的事件甚至在code覆盖工作浏览器的错误。就我而言,每次运行后,我有以下错误:

If you can't make the Code Coverage to work even after you've deleted the *.suo file, please check your Event Viewer for errors. In my case, after each run I had the following error:

TraceLog将探查由于缺乏仪器方法失败初始化过程vstest.executionengine.x86.exe

我已经找到了答案<一href="http://blogs.msdn.com/b/allendm/archive/2012/09/08/empty-coverage-file-with-profiler-related-errors-in-the-event-logs.aspx"相对=nofollow>这里

在情况下,链接不再可用,我贴在这里的内容:

In case the link is no longer available, I'm pasting the content in here:

如果你发现自己有一个空.coverage文件看看错误   类似于下面的事件日志,你最有可能有一个   损坏的安装

If you find yourself with a an empty .coverage file and see errors similar to the below in your event logs you most probably have a corrupt install

(信息).NET运行库版本4.0.30319.17929 - 探查有   要求将CLR实例不会加载探查到这   处理。探查CLSID:{b19f184a-cc62-4137-9a6f-af0f91730165}。   进程ID(十进制):12624.消息ID:[0x2516]

(info) .NET Runtime version 4.0.30319.17929 - The profiler has requested that the CLR instance not load the profiler into this process. Profiler CLSID: '{b19f184a-cc62-4137-9a6f-af0f91730165}'. Process ID (decimal): 12624. Message ID: [0x2516].

(错误)TraceLog将探查由于缺乏失败初始化   仪表的方法,过程vstest.executionengine.x86.exe

(Error) TraceLog Profiler failed in initialization due to a lack of instrumentation methods, process vstest.executionengine.x86.exe

检查

1)环境变量VS110COMNTOOLS设为   \ common7 \工具

a) Environment variable VS110COMNTOOLS is set to \common7\tools

二)REGKEY HKLM \ SOFTWARE \微软\ VisualStudio中\ 11.0 \安装目录设置   您\ Common7 \ IDE \

b) Regkey HKLM\SOFTWARE\Microsoft\VisualStudio\11.0\InstallDir is set to your \Common7\IDE\

C)covrun32.dll和covrun64.dll存在\团队   TOOLS \动态code覆盖

c) covrun32.dll and covrun64.dll exist in "\Team Tools\Dynamic Code Coverage"

祝你好运,

Nadav

这篇关于问题在VS 2012 code覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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