Windows Phone单元测试项目是否支持Visual Studio代码覆盖率分析? [英] Is Visual Studio Code Coverage Analysis supported for Windows Phone Unit Test Projects?

查看:47
本文介绍了Windows Phone单元测试项目是否支持Visual Studio代码覆盖率分析?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Visual Studio 2012 Update 4,并在此处创建了一个Windows Phone单元测试项目

I have Visual Studio 2012 Update 4 and have created a Windows Phone Unit Test Project following details here

http://msdn.microsoft.com/en-us/library/windowsphone/develop/dn168930(v=vs.105 ).aspx

我可以选择测试>分析运行所有测试的代码覆盖率,但代码覆盖率结果页面永远不会出现,菜单项(在测试>> Windows下)也显示为灰色。

I can select Test > Analyse Code Coverage which runs all the test but the Code Coverage Results Page never appears and the menu item (under Test  > Windows) is also greyed out.

Windows是否支持代码覆盖率电话项目?

Is Code Coverage supported for Windows Phone projects?

谢谢

推荐答案

<我确实相信Windows Phone Unit测试项目支持代码覆盖率。  (在Visual Studio 2012终极版中我可以使用代码覆盖率菜单选项,但是当我尝试它时,我没有获得代码覆盖率结果。)

I do not believe code coverage is supported for Windows Phone Unit test projects.  (The code coverage menu options are available to me in Visual Studio 2012 ultimate but I get no code coverage results when I tried them.)

如果选项完全变灰,可能是因为您没有正确版本的Visual Studio。根据
此MSDN文档代码覆盖率要求Visual Studio的Ultimate或Premium版本。

If the option is completely greyed out it may be because you do not have the right edition of Visual Studio. According to this MSDN documentation code coverage requires Ultimate or Premium edition of Visual Studio.

如果您可以将一些代码分离到可移植类库中,那么您可以在本地上下文中运行该部分的测试(例如:Windows桌面或Windows应用商店应用)以获取这些图书馆的代码覆盖率......

If you can separate some of your code in to portable class libraries then you could run tests for that portion in a local context (ex: Windows Desktop or Windows Store app) to get code coverage for those libraries...


这篇关于Windows Phone单元测试项目是否支持Visual Studio代码覆盖率分析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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