在哪里"创建单元测试"选择? [英] Where is the "Create Unit Tests" selection?

查看:184
本文介绍了在哪里"创建单元测试"选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了新的Visual Studio 2012旗舰版。

I have installed the new Visual Studio 2012 Ultimate.

我创建了一个测试项目与我的解决方案,它包含了一些默认的单元测试。然而右击新的方法不显示创建单元测试上下文菜单中的任何更长的时间。

I have created a Test Project with my solution and it contains some default unit tests. However right clicking on new Methods doesn't show the "Create Unit Tests" context menu any longer.

请参见Visual Studio 2010旗舰版:

See Visual Studio 2010 Ultimate:

和的Visual Studio 2012旗舰版:

And Visual Studio 2012 Ultimate:

任何想法,为什么这可能是?

Any idea why that could be?

更新:

解决方案为Visual Studio 2012和2013:

微软已经承认它<一个href="http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2748862-add-create-unit-tests-menu-option-back-">here并提供了一​​个<一个href="http://visualstudiogallery.msdn.microsoft.com/45208924-e7b0-45df-8cff-165b505a38d7?SRC=Home">official变通补丁解决它。下载,安装和享受!

Microsoft has acknowledged it here and offers an official work around patch to fix it. Download, install and Enjoy!

推荐答案

此功能从VS切断。

<一个href="http://blogs.msdn.com/b/visualstudioalm/archive/2012/03/08/what-s-new-in-visual-studio-11-beta-unit-testing.aspx">http://blogs.msdn.com/b/visualstudioalm/archive/2012/03/08/what-s-new-in-visual-studio-11-beta-unit-testing.aspx

生成单元测试向导 - 在VS2010中,你可以右键点击一个   方法在code,我们将生成一个单元测试到测试   项目。该向导是非常紧密耦合到MS-测试和依赖   像私人存取功能,以完成其工作,因此它被切断。我们   正在探索替代方案在这里,但是没有什么好的解决办法   呢。

Generate Unit Test Wizard – In VS2010 you could right click on a method in your code and we would generate a unit test into your test project. This wizard was very tightly coupled to MS-Test and depended on features like Private Accessors to do its work, so it was cut. We are exploring alternatives here, but don’t have any good solutions yet.

修改的有一个变通:<一href="http://blogs.msdn.com/b/malaysia/archive/2013/02/20/right-click-create-unit-tests.aspx">http://blogs.msdn.com/b/malaysia/archive/2013/02/20/right-click-create-unit-tests.aspx

这篇关于在哪里&QUOT;创建单元测试&QUOT;选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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