TestResult Class

 

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

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

Inheritance Hierarchy

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

Syntax

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

Constructors

Name Description
System_CAPS_protmethod TestResult()

Initializes a new instance of the TestResult class.

System_CAPS_pubmethod 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.

System_CAPS_protmethod TestResult(SerializationInfo, StreamingContext)

Initializes a new instance of the TestResult class from XML serialization.

System_CAPS_pubmethod TestResult(String, Guid, ITestElement)

Initializes a new instance of the TestResult class by using the provided computer name, test run ID, and test element.

System_CAPS_protmethod TestResult(TestResult)

Initializes a new instance of the TestResult class by copying the provided test result.

Properties

Name Description
System_CAPS_pubproperty CollectorDataEntries

Gets a read-only list of data entries that are provided by diagnostic data adapters during the test run.

System_CAPS_pubproperty ComputerName

Gets the name of the computer that executed the associated test run or test.(Inherited from TestResultMessage.)

System_CAPS_pubproperty DataCollectorMessages

Gets a read-only list of errors and warnings that are provided by diagnostic data adapters during the test.

System_CAPS_pubproperty DebugTrace

Gets or sets the debug trace information.

System_CAPS_pubproperty DisplayText

Gets the text to display in the user interface of Visual Studio Application Lifecycle Management (ALM).(Inherited from TestResultMessage.)

System_CAPS_pubproperty Duration

Gets or sets the time that was spent to execute the associated test or test run.(Inherited from TestResultMessage.)

System_CAPS_pubproperty EndTime

Gets or sets the time that the execution ended.(Inherited from TestResultMessage.)

System_CAPS_pubproperty ErrorInfo

Gets or sets information about the most recent error.

System_CAPS_pubproperty ErrorMessage

Gets or sets the most recent error message.

System_CAPS_pubproperty ErrorStackTrace

Gets or sets the stack trace information that precedes an error.

System_CAPS_pubproperty HasPassed

Gets a value that indicates whether the associated test for this test result successfully executed.

System_CAPS_pubproperty Id

Gets or sets the ID for this test result message.(Inherited from TestResultMessage.)

System_CAPS_pubproperty IsRunLevel

Gets a value that indicates whether this result is for a test run and not for a test.(Inherited from TestResultMessage.)

System_CAPS_pubproperty LongText

Gets the value of the DisplayText property.(Inherited from TestResultMessage.)

System_CAPS_pubproperty MessageKind

Gets or sets the kind of test result message for this associated test result message.(Inherited from TestResultMessage.)

System_CAPS_pubproperty Outcome

Gets or sets an object by using details about the outcome of the associated test.

System_CAPS_pubproperty OutcomeText

Gets the outcome of the test as a string.

System_CAPS_pubproperty ResultFiles

Gets a read-only list of paths to the test result files that are sorted in ascending order.

System_CAPS_pubproperty SpoolMessage

Gets or sets a value that determines whether this message will be spooled into the persisted test results.(Inherited from TestResultMessage.)

System_CAPS_pubproperty StartTime

Gets or sets the time that the associated test run or test started.(Inherited from TestResultMessage.)

System_CAPS_pubproperty StdErr

Gets or sets the stderr data that is generated by the test.

System_CAPS_pubproperty StdOut

Gets or sets the stdout data that is generated by the test.

System_CAPS_pubproperty 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.)

System_CAPS_pubproperty SystemException

Gets or sets the most recent exception that was encountered during the associated test run or test.(Inherited from TestResultMessage.)

System_CAPS_pubproperty Test

Gets or sets the associated test.

System_CAPS_pubproperty TestDescription

Gets the description of the test.

System_CAPS_pubproperty TestListCategoryId

Gets the ID of the list category for this test result.

System_CAPS_pubproperty TestName

Gets or sets the name of the associated test.(Inherited from TestResultMessage.)

System_CAPS_pubproperty TestResultsDirectory

Gets the absolute path of the folder on the server where this test result is stored.

System_CAPS_pubproperty TestRun

Gets the associated test run.

System_CAPS_pubproperty TestType

Gets or sets the type for the associated test.(Inherited from TestResultMessage.)

System_CAPS_pubproperty TextMessages

Gets an array of text messages in the test.

System_CAPS_pubproperty TimerResults

Gets or sets an array of timer results.

System_CAPS_pubproperty TraceInfo

Gets the trace information for the associated test.

System_CAPS_pubproperty 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.)

System_CAPS_pubproperty WorkItemIds

Gets a list of work item IDs that are associated with the test.

Methods

Name Description
System_CAPS_pubmethod AddTextMessage(String)

Adds a text message to this test result.

System_CAPS_pubmethod Clone()

Returns a copy of this test result.(Overrides TestResultMessage.Clone().)

System_CAPS_pubmethod Equals(Object)

Determines whether the provided object is equal to the current object.(Inherited from TestResultMessage.)

System_CAPS_pubmethod FillDataRow(DataRow)

Fills the provided data row by using property values from this test result for serialization.

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from TestResultMessage.)

System_CAPS_pubmethod GetObjectData(SerializationInfo, StreamingContext)

Populates the provided serialization information by using the data needed to serialize the target object.(Overrides TestResultMessage.GetObjectData(SerializationInfo, StreamingContext).)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod IsValid()

Determines whether this test result message is valid.(Inherited from TestResultMessage.)

System_CAPS_pubmethod Load(XmlElement, XmlTestStoreParameters)

Loads an instance of this class from the provided XML element by using the provided parameters.(Overrides TestResultMessage.Load(XmlElement, XmlTestStoreParameters).)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod Save(XmlElement, XmlTestStoreParameters)

Saves this object in the provided XML element.(Overrides TestResultMessage.Save(XmlElement, XmlTestStoreParameters).)

System_CAPS_pubmethod ToString()

Returns a string representation of this test result.(Overrides TestResultMessage.ToString().)

Fields

Name Description
System_CAPS_pubfieldSystem_CAPS_static ComputerNamePropertyName

Returns "ComputerName".

System_CAPS_pubfieldSystem_CAPS_static DebugTracePropertyName

Returns "DebugTrace".

System_CAPS_pubfieldSystem_CAPS_static DisplayTextPropertyName

Returns "DisplayText".

System_CAPS_pubfieldSystem_CAPS_static DurationPropertyName

Returns "Duration".

System_CAPS_pubfieldSystem_CAPS_static EndTimePropertyName

Returns "EndTime".

System_CAPS_pubfieldSystem_CAPS_static ErrorMessagePropertyName

Returns "ErrorMessage".

System_CAPS_pubfieldSystem_CAPS_static ErrorStackTracePropertyName

Returns "ErrorStackTrace".

System_CAPS_pubfieldSystem_CAPS_static HasPassedPropertyName

Returns "HasPassed".

System_CAPS_pubfieldSystem_CAPS_static LongTextPropertyName

Returns "LongText".

System_CAPS_protfield m_categoryId

Returns "categoryId".

System_CAPS_protfield m_debugTrace

Returns "debugTrace".

System_CAPS_protfield m_duration

This API supports the product infrastructure and is not intended to be used directly from your code. Returns the value of the Duration property.(Inherited from TestResultMessage.)

System_CAPS_protfield m_endTime

Returns the value of the EndTime property.(Inherited from TestResultMessage.)

System_CAPS_protfield m_errorInfo

Returns "errorInfo".

System_CAPS_protfield m_exception

Returns the value of the SystemException property.(Inherited from TestResultMessage.)

System_CAPS_protfield m_id

Returns the value of the P:Microsoft.VisualStudio.TestTools.Common.TestResultMessage.ID property.(Inherited from TestResultMessage.)

System_CAPS_protfield m_messageKind

Returns the value of the MessageKind property.(Inherited from TestResultMessage.)

System_CAPS_protfield m_outcome

Returns "outcome".

System_CAPS_protfield m_spoolMessage

Returns the value of the SpoolMessage property.(Inherited from TestResultMessage.)

System_CAPS_protfield m_startTime

Returns the value of the StartTime property.(Inherited from TestResultMessage.)

System_CAPS_protfield m_stdErr

Returns "stdErr".

System_CAPS_protfield m_stdOut

Returns "stdOut".

System_CAPS_protfield m_testName

Returns the value of the TestName property.(Inherited from TestResultMessage.)

System_CAPS_protfield m_testType

Returns the value of the TestType property.(Inherited from TestResultMessage.)

System_CAPS_protfield m_textMessages

Returns "textMessages".

System_CAPS_protfield m_timerResults

Returns "timerResults".

System_CAPS_protfield m_traceInfo

Returns "traceInfo".

System_CAPS_protfield m_workItemIds

Returns "workItemIds".

System_CAPS_pubfieldSystem_CAPS_static ObjectColumnName

Returns "objectcolumn".

System_CAPS_pubfieldSystem_CAPS_static OutcomePropertyName

Returns "Outcome".

System_CAPS_pubfieldSystem_CAPS_static OutcomeTextPropertyName

Returns "OutcomeText".

System_CAPS_pubfieldSystem_CAPS_static StartTimePropertyName

Returns "StartTime".

System_CAPS_pubfieldSystem_CAPS_static StdErrPropertyName

Returns "StdErr".

System_CAPS_pubfieldSystem_CAPS_static StdOutPropertyName

Returns "StdOut".

System_CAPS_pubfieldSystem_CAPS_static StoragePropertyName

Returns "Storage".

System_CAPS_pubfieldSystem_CAPS_static TestNamePropertyName

Returns "TestName".

System_CAPS_pubfieldSystem_CAPS_static TestRunParameterName

Returns "TestRun".

System_CAPS_pubfieldSystem_CAPS_static TestTypePropertyName

Returns "TestType".

System_CAPS_pubfieldSystem_CAPS_static TraceInfoPropertyName

Returns "TraceInfo".

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

TestResultMessage
Microsoft.VisualStudio.TestTools.Common Namespace

Return to top