TestRun 類別
提供執行測試工作時所擷取的快照。此類別無法被繼承。
繼承階層架構
System.Object
Microsoft.VisualStudio.TestTools.Common.TestRun
命名空間: Microsoft.VisualStudio.TestTools.Common
組件: Microsoft.VisualStudio.QualityTools.Common (在 Microsoft.VisualStudio.QualityTools.Common.dll 中)
語法
'宣告
<SerializableAttribute> _
Public NotInheritable Class TestRun _
Implements ISerializable, ICloneable, IVisiblePropertyProvider, IVerifiable, _
IPersistable, IXmlTestStore
[SerializableAttribute]
public sealed class TestRun : ISerializable,
ICloneable, IVisiblePropertyProvider, IVerifiable, IPersistable, IXmlTestStore
[SerializableAttribute]
public ref class TestRun sealed : ISerializable,
ICloneable, IVisiblePropertyProvider, IVerifiable, IPersistable, IXmlTestStore
[<Sealed>]
[<SerializableAttribute>]
type TestRun =
class
interface ISerializable
interface ICloneable
interface IVisiblePropertyProvider
interface IVerifiable
interface IPersistable
interface IXmlTestStore
end
public final class TestRun implements ISerializable, ICloneable, IVisiblePropertyProvider, IVerifiable, IPersistable, IXmlTestStore
TestRun 型別會公開下列成員。
屬性
名稱 | 說明 | |
---|---|---|
![]() |
AutoSaveResults | 取得或設定布林值,這個值表示是否已自動儲存測試結果。 |
![]() |
BuildFlavor | 取得或設定執行測試的組建喜好。測試可以針對「偵錯」或「發行」來執行。 |
![]() |
BuildPlatform | 取得或設定執行測試的組建平台。 |
![]() |
ContainsManualTest | 取得布林值,指出此測試是否為手動。 |
![]() |
Created | 取得建立執行個體時的日期與時間。 |
![]() |
Finished | 取得或設定始測試完成時的日期和時間。 |
![]() |
Id | 取得已執行之測試的 ID。 |
![]() |
IdString | 取得 TestRun ID 的字串表示。 |
![]() |
Name | 取得或設定測試回合的名稱。 |
![]() |
Queued | 取得或設定測試回合排入佇列時的日期和時間。 |
![]() |
Result | 取得所用的測試結果,此結果含有回合層級的結果。 |
![]() |
ResultFileName | 取得或設定結果檔的檔案名稱。 |
![]() |
ResultFilePath | 取得或設定結果檔的路徑。 |
![]() |
RunConfiguration | 取得或設定測試回合的組態。 |
![]() |
RunUser | 取得或設定這個測試回合的使用者。 |
![]() |
Started | 取得或設定測試回合啟動的日期和時間。 |
![]() |
Tests | 取得根層級的測試。 |
![]() |
UserData | 取得或設定使用者資料物件。 |
![]() |
VisibleProperties | 取得測試回合的屬性。 |
回頁首
方法
名稱 | 說明 | |
---|---|---|
![]() |
Clone | 傳回測試物件的複製品。 |
![]() |
CountTestCases | 傳回此回合及所有彙總測試中包含之測試案例的數目。 |
![]() |
Equals | 判斷提供的 TestRun 物件是否等於目前的物件。 (覆寫 Object.Equals(Object)。) |
![]() |
GetHashCode | 傳回測試回合的 ID 的雜湊碼。 (覆寫 Object.GetHashCode()。) |
![]() |
GetInnerTests | 擷取含有指定執行 ID 之測試的內部測試。 |
![]() |
GetObjectData | 使用序列化目標物件所需的資料填入 SerializationInfo。 |
![]() |
GetResultFilesDirectory | 返回包含指定測試結果的相關檔案的目錄。 |
![]() |
GetTestElement(TestExecId) | 傳回含有指定執行 ID 的測試項目。 |
![]() |
GetTestElement(TestExecId, TestId) | 傳回含有指定 ID 及其父代之執行 ID 的測試項目。 |
![]() |
GetType | 取得目前執行個體的 Type。 (繼承自 Object)。 |
![]() |
IsValid | 傳回布林值,指出測試回合是否有效。 |
![]() |
Load | 使用提供的參數,從提供的 XML 項目載入此類別的執行個體。 |
![]() |
PrepareToPersist | 準備欄位供 XML 持續性設定。 |
![]() |
RecoverFromPersistence | 在持續還原項目對應。 |
![]() |
Save | 使用提供的參數,將這個物件儲存在提供的 XML 項目中。 |
![]() |
ToString | 傳回測試回合的字串表示。 (覆寫 Object.ToString()。) |
回頁首
備註
這個類別實作 ISerializable、ICloneable、IPersistable、IVerifiable 和 IVisiblePropertyProvider。每當加入新欄位時,都必須將其加入至 ISerializable 方法。
執行緒安全
這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。不保證任何執行個體成員是安全執行緒。