Class TestResultMessage
Default implementation of ITestResultMessage.
public abstract class TestResultMessage : TestMessage, ITestResultMessage, ITestMessage, ITestCaseMessage, ITestMethodMessage, ITestClassMessage, ITestCollectionMessage, ITestAssemblyMessage, IMessageSinkMessage, IJsonSerializable, IExecutionMetadata
- Inheritance
-
TestResultMessage
- Implements
- Derived
- Inherited Members
Properties
ExecutionTime
The time spent executing the test, in seconds. Will be 0 if the test was not executed.
public required decimal ExecutionTime { get; set; }
Property Value
FinishTime
Gets the date and time when the test execution finished.
public required DateTimeOffset FinishTime { get; set; }
Property Value
Output
The captured output of the test. Will be Empty if there was no output.
public required string Output { get; set; }
Property Value
Warnings
Gets a list of the warning messages that were recorded during execution. Will be null
if there were no warnings.
public required string[]? Warnings { get; set; }
Property Value
- string[]
Methods
Serialize(JsonObjectSerializer)
Override to serialize the values in the message into JSON.
protected override void Serialize(JsonObjectSerializer serializer)
Parameters
serializerJsonObjectSerializerThe serializer to write values to.
ToString()
public override string ToString()
Returns
ValidateObjectState(HashSet<string>)
Called before serializing the message. Implementers are expected to call ValidatePropertyIsNotNull(object?, string, HashSet<string>) for each property that must have a value, to record invalid property values into the provided hash set.
protected override void ValidateObjectState(HashSet<string> invalidProperties)