简体   繁体   English

VS 2013中没有“运行单元测试”选项

[英]“Run Unit Tests” option is not there in VS 2013

I am watching a video tutorial for unit testing. 我正在观看有关单元测试的视频教程。 In that tutorial, when the lecturer clicks a right-click on Unit test class, one of the options there is "Run Unit Tests" whereas I am not getting that option. 在该教程中,当讲师单击右键单击“单元测试”课程时,其中一个选项是“运行单元测试”,而我没有得到该选项。

在此处输入图片说明

Here are the options my VS showing: 这是我的VS显示的选项:

在此处输入图片说明

Another thing is, when he uses the name of a class / method which does not exist, a bulb appears on the left side. 另一件事是,当他使用不存在的类/方法的名称时,左侧会出现一个灯泡。 This also does not appear in my VS. 这也没有出现在我的VS中。

在此处输入图片说明

PS 聚苯乙烯

  1. I am using VS-2013, win 7 64-bit 我正在使用VS-2013,赢得7 64位
  2. I cannot contact the tutorial maker otherwise could have asked him directly 我无法联系教程制作者,否则可以直接问他

The Run Unit Tests, Debug Unit Tests are present due to an Extension that is Installed named Resharper, you can download this on a free 30 day trial. 由于安装了名为Resharper的扩展,因此提供了“运行单元测试”和“调试单元测试”,您可以免费下载30天试用版。

https://www.jetbrains.com/resharper/download/ https://www.jetbrains.com/resharper/download/

Edit: 29/10/2017 - Visual Studio 2017 now provides live unit testing, whilst right clicking in a testable class a Live Unit Testing option appears, there is also a Test option across the toolbar that allows you additional unit test options such as debugging, running and live unit testing. 编辑:2017年10月29日-Visual Studio 2017现在提供实时单元测试,而在可测试的类上单击鼠标右键将显示实时单元测试选项,工具栏上还有一个``测试''选项,允许您使用其他单元测试选项,例如调试,运行和实时单元测试。

If you're on VS2017 w/ an old version of ReSharper (I was on 2017.2.2) and using .NET Core, update to the latest version via Resharper -> Help -> Check for Updates. 如果您使用旧版ReSharper(我在2017.2.2上)并使用.NET Core使用VS2017,请通过Resharper->帮助->检查更新将其更新为最新版本。 Right-click "Run Unit Tests" works for me again on 2018.1. 右键单击“运行单元测试”于2018.1。再次为我工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM