如何在VS 2017 .net核心项目中生成单元测试用例? [英] How to generate unit test cases in VS 2017 .net core project?

查看:200
本文介绍了如何在VS 2017 .net核心项目中生成单元测试用例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2017 for .Net核心项目中缺少创建单元测试"上下文菜单选项吗?

"Create Unit Tests" context menu option is missing in Visual Studio 2017 for .Net core project?

我阅读了一些文章,说在VS2017/Core/x64配置中删除了创建单元测试"上下文菜单选项.但是那些是老文章.因此,想检查此选项现在是否可用?如果没有,我们还有其他选择(扩展)来生成测试用例吗?如果是这样,请让我知道步骤.

I read some articles saying that "Create Unit Tests" context menu option is removed in VS2017/Core/x64 config. But those were old articles. So, wanted to check if this option is available now? If not, do we have any other alternatives (extensions) to generate the test cases? If so, kindly let me know the steps.

我正在研究VS 2017/.NetCore 2.0项目.

I am working on VS 2017/.NetCore 2.0 project.

感谢您的帮助!

推荐答案

也许您已经找到了解决方案.对于这些,仍在寻找:

Perhaps you've found a solution already. For those, still looking for one:

...此问题预计将在15.8版本的时间表内得到解决,因此,遗憾的是,在即将发布的15.7版本中将无法为.NET Core项目创建单元测试功能.

...This issue is expected to be resolved in 15.8 release timeframe so unfortunately, create unit test functionality for .NET Core projects would not be available in the upcoming 15.7 release.

-从已发布的问题引用(请参见Sercan的评论).

-- quoted from the posted issue (see Sercan's comment).

直到我使用单元测试样板生成器(请参见下图) ).

Until then I use Unit Test Boilerplate Generator (see the picture below).

HTH:)

这篇关于如何在VS 2017 .net核心项目中生成单元测试用例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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