TestRun.GetTestElement 方法 (TestExecId)

傳回含有指定執行 ID 的測試項目。

命名空間:  Microsoft.VisualStudio.TestTools.Common
組件:  Microsoft.VisualStudio.QualityTools.Common (在 Microsoft.VisualStudio.QualityTools.Common.dll 中)

語法

'宣告
Public Function GetTestElement ( _
    executionId As TestExecId _
) As ITestElement
public ITestElement GetTestElement(
    TestExecId executionId
)
public:
ITestElement^ GetTestElement(
    TestExecId^ executionId
)
member GetTestElement : 
        executionId:TestExecId -> ITestElement 
public function GetTestElement(
    executionId : TestExecId
) : ITestElement

參數

傳回值

型別:Microsoft.VisualStudio.TestTools.Common.ITestElement
測試項目或 Null。

備註

這個方法還會在傳回的測試項目上設定執行 ID、父執行 ID 和分類 ID。

.NET Framework 安全性

請參閱

參考

TestRun 類別

GetTestElement 多載

Microsoft.VisualStudio.TestTools.Common 命名空間

TestExecId

ITestElement