CodedUITestAttribute 类

说明该属性使用的方法可被编辑并且可用编码的 UI 测试框架来播放。

继承层次结构

System.Object
  System.Attribute
    Microsoft.VisualStudio.TestTools.UnitTesting.TestClassExtensionAttribute
      Microsoft.VisualStudio.TestTools.UITesting.CodedUITestAttribute

命名空间:  Microsoft.VisualStudio.TestTools.UITesting
程序集:  Microsoft.VisualStudio.QualityTools.CodedUITestFramework(在 Microsoft.VisualStudio.QualityTools.CodedUITestFramework.dll 中)

语法

声明
<SerializableAttribute> _
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False)> _
Public NotInheritable Class CodedUITestAttribute _
    Inherits TestClassExtensionAttribute
[SerializableAttribute]
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false)]
public sealed class CodedUITestAttribute : TestClassExtensionAttribute
[SerializableAttribute]
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = false)]
public ref class CodedUITestAttribute sealed : public TestClassExtensionAttribute
[<Sealed>]
[<SerializableAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false)>]
type CodedUITestAttribute =  
    class
        inherit TestClassExtensionAttribute
    end
public final class CodedUITestAttribute extends TestClassExtensionAttribute

CodedUITestAttribute 类型公开以下成员。

构造函数

  名称 说明
公共方法 CodedUITestAttribute 初始化 CodedUITestAttribute 类的新实例。

页首

属性

  名称 说明
公共属性 ExtensionId 获取编码的 UI 测试的通用资源标识符 (URI)。 (重写 TestClassExtensionAttribute.ExtensionId。)
公共属性 TypeId 当在派生类中实现时,获取该 Attribute 的唯一标识符。 (继承自 Attribute。)

页首

方法

  名称 说明
公共方法 Equals 确定此测试类扩展对象是否与提供的测试类扩展对象相等。 (继承自 TestClassExtensionAttribute。)
公共方法 GetClientSide 返回表示编码的 UI 测试的客户端的对象。 (重写 TestClassExtensionAttribute.GetClientSide()。)
公共方法 GetExecution 返回实现单元测试事件的对象。 (重写 TestClassExtensionAttribute.GetExecution()。)
公共方法 GetHashCode 针对测试类扩展对象 ID,返回哈希代码。 (继承自 TestClassExtensionAttribute。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 IsDefaultAttribute 当在派生类中重写时,指示此实例的值是否是派生类的默认值。 (继承自 Attribute。)
公共方法 Match 当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。 (继承自 Attribute。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

显式接口实现

  名称 说明
显式接口实现私有方法 _Attribute.GetIDsOfNames 将一组名称映射为对应的一组调度标识符。 (继承自 Attribute。)
显式接口实现私有方法 _Attribute.GetTypeInfo 检索对象的类型信息,然后可以使用该信息获取接口的类型信息。 (继承自 Attribute。)
显式接口实现私有方法 _Attribute.GetTypeInfoCount 检索对象提供的类型信息接口的数量(0 或 1)。 (继承自 Attribute。)
显式接口实现私有方法 _Attribute.Invoke 提供对某一对象公开的属性和方法的访问。 (继承自 Attribute。)

页首

备注

有关如何使用特性的更多信息,请参见利用特性扩展元数据

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.VisualStudio.TestTools.UITesting 命名空间

其他资源

利用特性扩展元数据