Share via


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 傳回測試類別延伸物件的雜湊碼。 (繼承自 TestClassExtensionAttribute)。
公用方法 GetType 取得目前執行個體的 Type。 (繼承自 Object)。
公用方法 IsDefaultAttribute 在衍生類別中覆寫時,表示這個執行個體的值是否為衍生類別的預設值。 (繼承自 Attribute)。
公用方法 Match 在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。 (繼承自 Attribute)。
公用方法 ToString 傳回表示目前物件的字串。 (繼承自 Object)。

回頁首

明確介面實作

  名稱 說明
明確介面實作私用方法 _Attribute.GetIDsOfNames 將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。 (繼承自 Attribute)。
明確介面實作私用方法 _Attribute.GetTypeInfo 擷取物件的型別資訊,可以用來取得介面的型別資訊。 (繼承自 Attribute)。
明確介面實作私用方法 _Attribute.GetTypeInfoCount 擷取物件提供的型別資訊介面數目 (0 或 1)。 (繼承自 Attribute)。
明確介面實作私用方法 _Attribute.Invoke 提供物件所公開的屬性和方法的存取權。 (繼承自 Attribute)。

回頁首

備註

如需如何使用屬性的詳細資訊,請參閱使用屬性擴充中繼資料

執行緒安全

這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。不保證任何執行個體成員是安全執行緒。

請參閱

參考

Microsoft.VisualStudio.TestTools.UITesting 命名空間

其他資源

使用屬性擴充中繼資料