我没有在visual studio 2015专业版中看到DataRow属性 [英] Am not seeing DataRow attribute in visual studio 2015 professional edition

查看:57
本文介绍了我没有在visual studio 2015专业版中看到DataRow属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Microsoft.VisualStudio.TestTools.UnitTesting;

Am using Microsoft.VisualStudio.TestTools.UnitTesting;

我没有获得DataRow属性 选项。 vs 2015 

am not getting DataRow attribute  option. vs 2015 

为什么它没有显示

charantej

charantej

推荐答案

您好charantej,

Hi charantej,

欢迎来到MSDN论坛!

Welcome to the MSDN forum!

根据您的描述,您还没有在您的环境中安装包。

According you description, you have not install package in your environment.

您可以参考以下步骤进行安装:

You can refer to below steps to install it:


  1. 点击工具 - > ; NuGet包管理器 - > 包管理器控制台
  2. 键入" Install-package MSTest.TestFramework"
    程序包管理器控制台窗口中,如下所示:
  1. Click Tools->NuGet package Manager->Package Manager Console
  2. Type "Install-package MSTest.TestFramework" in Package Manager Console window, like this:

PM>安装包MSTest.TestFramework

  3.安装软件包后,您可以在
References
中找到两个引用。如下截图:

  3. After install the package, you could find two references in References. As below screenshot:

这是我身边的一些代码,它显示 DataRow属性
正常

This is some code in my side, it shows DataRow attribute normal:

using System;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using Bank;

using System.IO;

using System.Data;

namespace UnitTestProject1

{

public class UnitTest3

       {

              [DataTestMethod]

              [DataRow("GOOGLE")]

              public void TestCheckSite(string site)

              {

                     //…

              }

    }

}

此外,这是类似的案例链接:

http://stackoverflow.com/questions/39373156/issues-using-datatestmethod-and-datarow-attributes-in- ms-test  

希望能帮到你!

最好的问候,


这篇关于我没有在visual studio 2015专业版中看到DataRow属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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