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
參數
- executionId
型別:Microsoft.VisualStudio.TestTools.Common.TestExecId
測試項目的執行 ID。
傳回值
型別:Microsoft.VisualStudio.TestTools.Common.ITestElement
測試項目或 Null。
備註
這個方法還會在傳回的測試項目上設定執行 ID、父執行 ID 和分類 ID。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。