Partager via


TestRun Class

Provides a snapshot of a test job that was taken when it was executed. This class cannot be inherited.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.TestTools.Common.TestRun

Namespace:  Microsoft.VisualStudio.TestTools.Common
Assembly:  Microsoft.VisualStudio.QualityTools.Common (in Microsoft.VisualStudio.QualityTools.Common.dll)

Syntax

'Declaration
<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

The TestRun type exposes the following members.

Properties

  Name Description
Public property AutoSaveResults Gets or sets a Boolean value that indicates whether the test results have been auto-saved.
Public property BuildFlavor Gets or sets the build flavor for which the test was run. The tests can be run for "Debug" or "Release".
Public property BuildPlatform Gets or sets the build platform for which the test was run.
Public property ContainsManualTest Gets a Boolean value that indicates whether this test is manual.
Public property Created Gets the date and time when this test was created.
Public property Finished Gets or sets the date and time when this test was completed.
Public property Id Gets the ID of the test that is executed.
Public property IdString Gets the string representation of the TestRun ID.
Public property Name Gets or sets the name of the test run.
Public property Queued Gets or sets the date and time when the test run was queued.
Public property Result Gets the test result that is used that contains the run level results.
Public property ResultFileName Gets or sets the file name of the result file.
Public property ResultFilePath Gets or sets the path of the result file.
Public property RunConfiguration Gets or sets the configuration for the test run.
Public property RunUser Gets or sets the user of this test run.
Public property Started Gets or sets the date and time when the test run started.
Public property Tests Gets the root level tests.
Public property UserData Gets or sets the user data object.
Public property VisibleProperties Gets the properties of the test run.

Top

Methods

  Name Description
Public method Clone Returns a clone of the test object.
Public method CountTestCases Returns the number of test cases that are contained in this run and in all aggregation tests.
Public method Equals Determines whether the provided TestRun object is equal to the current object. (Overrides Object.Equals(Object).)
Public method GetHashCode Returns the hash code of the ID of the test run. (Overrides Object.GetHashCode.)
Public method GetInnerTests Retrieves the inner tests for the test that has the specified execution ID.
Public method GetObjectData Populates a SerializationInfo by using the data that are required to serialize the target object.
Public method GetResultFilesDirectory Returns a directory that consists of dependent files for the specified test result.
Public method GetTestElement(TestExecId) Returns the test element that has the specified execution ID.
Public method GetTestElement(TestExecId, TestId) Returns the test element that has the specified ID and the execution ID of its parent.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IsValid Returns a Boolean value that indicates whether the test run is valid.
Public method Load Loads an instance of this class from the provided XML element by using the provided parameters.
Public method PrepareToPersist Prepares the fields for setting by XML persistence.
Public method RecoverFromPersistence Restores the element map after the persistence.
Public method Save Saves this object in the provided XML element by using the provided parameters.
Public method ToString Returns a string representation of the test run. (Overrides Object.ToString.)

Top

Remarks

This class implements ISerializable, ICloneable, IPersistable, IVerifiable and IVisiblePropertyProvider. Whenever a new field is added, it must be added to the ISerializable methods.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.TestTools.Common Namespace

ICloneable

IPersistable

ISerializable

IVerifiable

IVisiblePropertyProvider