TestResult Class

Represents a base class for test results and represents the results of a test.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TestTools.Common.TestMessage
    Microsoft.VisualStudio.TestTools.Common.TestResultMessage
      Microsoft.VisualStudio.TestTools.Common.TestResult
        Microsoft.VisualStudio.TestTools.Common.TestResultAggregation

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

Syntax

'Declaration
<SerializableAttribute> _
Public Class TestResult _
    Inherits TestResultMessage
[SerializableAttribute]
public class TestResult : TestResultMessage
[SerializableAttribute]
public ref class TestResult : public TestResultMessage
[<SerializableAttribute>]
type TestResult =  
    class
        inherit TestResultMessage
    end
public class TestResult extends TestResultMessage

The TestResult type exposes the following members.

Constructors

  Name Description
Protected method TestResult() Initializes a new instance of the TestResult class.
Protected method TestResult(TestResult) Initializes a new instance of the TestResult class by copying the provided test result.
Protected method TestResult(SerializationInfo, StreamingContext) Initializes a new instance of the TestResult class from XML serialization.
Public method TestResult(String, Guid, ITestElement) Initializes a new instance of the TestResult class by using the provided computer name, test run ID, and test element.
Public method TestResult(ComputerInfo, Guid, ITestElement) Obsolete. Initializes a new instance of the TestResult class by using the provided computer information, test run ID, and test element.

Top

Properties

  Name Description
Public property CollectorDataEntries Gets a read-only list of data entries that are provided by diagnostic data adapters during the test run.
Public property ComputerName Gets the name of the computer that executed the associated test run or test. (Inherited from TestResultMessage.)
Public property DataCollectorMessages Gets a read-only list of errors and warnings that are provided by diagnostic data adapters during the test.
Public property DebugTrace Gets or sets the debug trace information.
Public property DisplayText Gets the text to display in the user interface of Visual Studio Application Lifecycle Management (ALM). (Inherited from TestResultMessage.)
Public property Duration Gets or sets the time that was spent to execute the associated test or test run. (Inherited from TestResultMessage.)
Public property EndTime Gets or sets the time that the execution ended. (Inherited from TestResultMessage.)
Public property ErrorInfo Gets or sets information about the most recent error.
Public property ErrorMessage Gets or sets the most recent error message.
Public property ErrorStackTrace Gets or sets the stack trace information that precedes an error.
Public property HasPassed Gets a value that indicates whether the associated test for this test result successfully executed.
Public property Id Gets or sets the ID for this test result message. (Inherited from TestResultMessage.)
Public property IsRunLevel Gets a value that indicates whether this result is for a test run and not for a test. (Inherited from TestResultMessage.)
Public property LoadTestAgentNames Gets a comma-delimited list of the names of machines where the associated load test is installed. (Inherited from TestResultMessage.)
Public property LongText Gets the value of the DisplayText property. (Inherited from TestResultMessage.)
Public property MessageKind Gets or sets the kind of test result message for this associated test result message. (Inherited from TestResultMessage.)
Public property Outcome Gets or sets an object by using details about the outcome of the associated test.
Public property OutcomeText Gets the outcome of the test as a string.
Public property ResultFiles Gets a read-only list of paths to the test result files that are sorted in ascending order.
Public property SpoolMessage Gets or sets a value that determines whether this message will be spooled into the persisted test results. (Inherited from TestResultMessage.)
Public property StartTime Gets or sets the time that the associated test run or test started. (Inherited from TestResultMessage.)
Public property StdErr Gets or sets the stderr data that is generated by the test.
Public property StdOut Gets or sets the stdout data that is generated by the test.
Public property Storage Gets or sets the relative path of a folder where all files that are associated with the test are stored on the server. (Inherited from TestResultMessage.)
Public property SystemException Gets or sets the most recent exception that was encountered during the associated test run or test. (Inherited from TestResultMessage.)
Public property Test Gets or sets the associated test.
Public property TestDescription Gets the description of the test.
Public property TestListCategoryId Gets the ID of the list category for this test result.
Public property TestListCategoryIdString Gets the ID of the list category for this test result as a string.
Public property TestName Gets or sets the name of the associated test. (Inherited from TestResultMessage.)
Public property TestResultsDirectory Gets the absolute path of the folder on the server where this test result is stored.
Public property TestRun Gets the associated test run.
Public property TestType Gets or sets the type for the associated test. (Inherited from TestResultMessage.)
Public property TextMessages Gets an array of text messages in the test.
Public property TimerResults Gets or sets an array of timer results.
Public property TraceInfo Gets the trace information for the associated test.
Public property VisibleProperties Gets a collection of the properties in this test result message that will be visible in the user interface of Visual Studio Application Lifecycle Management (ALM). (Inherited from TestResultMessage.)
Public property WorkItemIds Gets a list of work item IDs that are associated with the test.

Top

Methods

  Name Description
Public method AddTextMessage Adds a text message to this test result.
Public method Clone Returns a copy of this test result. (Overrides TestResultMessage.Clone().)
Public method Equals Determines whether the provided object is equal to the current object. (Inherited from TestResultMessage.)
Public method FillDataRow Fills the provided data row by using property values from this test result for serialization.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from TestResultMessage.)
Public method GetObjectData Populates the provided serialization information by using the data needed to serialize the target object. (Overrides TestResultMessage.GetObjectData(SerializationInfo, StreamingContext).)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IsValid Determines whether this test result message is valid. (Inherited from TestResultMessage.)
Public method Load Loads an instance of this class from the provided XML element by using the provided parameters. (Overrides TestResultMessage.Load(XmlElement, XmlTestStoreParameters).)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Save Saves this object in the provided XML element. (Overrides TestResultMessage.Save(XmlElement, XmlTestStoreParameters).)
Public method ToString Returns a string representation of this test result. (Overrides TestResultMessage.ToString().)

Top

Fields

  Name Description
Public fieldStatic member ComputerNamePropertyName Returns "ComputerName".
Public fieldStatic member DebugTracePropertyName Returns "DebugTrace".
Public fieldStatic member DisplayTextPropertyName Returns "DisplayText".
Public fieldStatic member DurationPropertyName Returns "Duration".
Public fieldStatic member EndTimePropertyName Returns "EndTime".
Public fieldStatic member ErrorMessagePropertyName Returns "ErrorMessage".
Public fieldStatic member ErrorStackTracePropertyName Returns "ErrorStackTrace".
Public fieldStatic member HasPassedPropertyName Returns "HasPassed".
Public fieldStatic member LongTextPropertyName Returns "LongText".
Protected field m_categoryId Returns "categoryId".
Protected field m_debugTrace Returns "debugTrace".
Protected field m_duration Infrastructure. Returns the value of the Duration property. (Inherited from TestResultMessage.)
Protected field m_endTime Returns the value of the EndTime property. (Inherited from TestResultMessage.)
Protected field m_errorInfo Returns "errorInfo".
Protected field m_exception Returns the value of the SystemException property. (Inherited from TestResultMessage.)
Protected field m_id Returns the value of the ID() property. (Inherited from TestResultMessage.)
Protected field m_messageKind Returns the value of the MessageKind property. (Inherited from TestResultMessage.)
Protected field m_outcome Returns "outcome".
Protected field m_spoolMessage Returns the value of the SpoolMessage property. (Inherited from TestResultMessage.)
Protected field m_startTime Returns the value of the StartTime property. (Inherited from TestResultMessage.)
Protected field m_stdErr Returns "stdErr".
Protected field m_stdOut Returns "stdOut".
Protected field m_testName Returns the value of the TestName property. (Inherited from TestResultMessage.)
Protected field m_testType Returns the value of the TestType property. (Inherited from TestResultMessage.)
Protected field m_textMessages Returns "textMessages".
Protected field m_timerResults Returns "timerResults".
Protected field m_traceInfo Returns "traceInfo".
Protected field m_workItemIds Returns "workItemIds".
Public fieldStatic member ObjectColumnName Returns "objectcolumn".
Public fieldStatic member OutcomePropertyName Returns "Outcome".
Public fieldStatic member OutcomeTextPropertyName Returns "OutcomeText".
Public fieldStatic member StartTimePropertyName Returns "StartTime".
Public fieldStatic member StdErrPropertyName Returns "StdErr".
Public fieldStatic member StdOutPropertyName Returns "StdOut".
Public fieldStatic member StoragePropertyName Returns "Storage".
Public fieldStatic member TestNamePropertyName Returns "TestName".
Public fieldStatic member TestRunParameterName Returns "TestRun".
Public fieldStatic member TestTypePropertyName Returns "TestType".
Public fieldStatic member TraceInfoPropertyName Returns "TraceInfo".

Top

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

TestResultMessage