TestResult Class#
The outcome of an individual test, passed to the reporter when a test ends.
public sealed record TestResult : System.IEquatable<Motus.Abstractions.TestResult>
Inheritance System.Object → TestResult
Implements System.IEquatable<TestResult>
Constructors#
TestResult(string, bool, double, string, string, IReadOnlyList<string>, bool, bool, int) Constructor#
The outcome of an individual test, passed to the reporter when a test ends.
public TestResult(string TestName, bool Passed, double DurationMs, string? ErrorMessage=null, string? StackTrace=null, System.Collections.Generic.IReadOnlyList<string>? Attachments=null, bool Flaky=false, bool Quarantined=false, int Attempts=1);
Parameters#
TestName System.String
The fully qualified name of the test.
Passed System.Boolean
Whether the test passed.
DurationMs System.Double
The duration of the test in milliseconds.
ErrorMessage System.String
The error message if the test failed, or null.
StackTrace System.String
The stack trace if the test failed, or null.
Attachments System.Collections.Generic.IReadOnlyList<System.String>
File paths to screenshots, traces, or other artifacts captured during the test.
Flaky System.Boolean
Whether the test failed at least once and then passed within its retry budget.
Quarantined System.Boolean
Whether the test is quarantined, so its outcome does not gate the run.
Attempts System.Int32
The number of times the test was executed (1 when it passed or failed on the first try).
Properties#
Attachments Property#
File paths to screenshots, traces, or other artifacts captured during the test.
public System.Collections.Generic.IReadOnlyList<string>? Attachments { get; init; }
Property Value#
System.Collections.Generic.IReadOnlyList<System.String>
Attempts Property#
The number of times the test was executed (1 when it passed or failed on the first try).
public int Attempts { get; init; }
Property Value#
DurationMs Property#
The duration of the test in milliseconds.
public double DurationMs { get; init; }
Property Value#
ErrorMessage Property#
The error message if the test failed, or null.
public string? ErrorMessage { get; init; }
Property Value#
Flaky Property#
Whether the test failed at least once and then passed within its retry budget.
public bool Flaky { get; init; }
Property Value#
Passed Property#
Whether the test passed.
public bool Passed { get; init; }
Property Value#
Quarantined Property#
Whether the test is quarantined, so its outcome does not gate the run.
public bool Quarantined { get; init; }
Property Value#
StackTrace Property#
The stack trace if the test failed, or null.
public string? StackTrace { get; init; }
Property Value#
TestName Property#
The fully qualified name of the test.
public string TestName { get; init; }