Class TestExecution
Represents a single test execution with all associated metadata and results.
public sealed class TestExecution
- Inheritance
-
TestExecution
- Inherited Members
Properties
Context
Gets or sets the execution context tracking order, parallelization, and suite state.
public ExecutionContext? Context { get; set; }
Property Value
Remarks
Enables detection of order-dependent failures, parallel execution issues, and resource contention patterns. Provides insights into test execution sequence, previous test information, and parallelization state.
Duration
Gets or sets the duration of the test execution.
public TimeSpan Duration { get; set; }
Property Value
EndTimeUtc
Gets or sets the end time of the test execution in UTC.
public DateTime EndTimeUtc { get; set; }
Property Value
ErrorMessage
Gets or sets the error message if the test failed.
public string? ErrorMessage { get; set; }
Property Value
ErrorMessageHash
Gets or sets a stable hash of the error message for grouping similar failures.
public string? ErrorMessageHash { get; set; }
Property Value
Remarks
This hash enables grouping of test failures with identical or similar error messages, helping identify common failure patterns across test runs and environments. The hash is computed using SHA256 for stability and collision resistance.
ExceptionType
Gets or sets the exception type if the test failed due to an exception.
public string? ExceptionType { get; set; }
Property Value
ExecutionId
Gets or sets the unique identifier for this test execution instance. This changes with each execution of the test.
public Guid ExecutionId { get; set; }
Property Value
Identity
Gets or sets the stable test identity that persists across runs. This is the primary identifier for tracking tests over time.
public TestIdentity Identity { get; set; }
Property Value
Remarks
The TestIdentity contains a stable hash-based ID that remains constant for the same test across different environments, machines, and runs. Use this for historical analysis and tracking test reliability.
Metadata
Gets or sets the test metadata including categories, tags, and custom attributes.
public TestMetadata? Metadata { get; set; }
Property Value
Outcome
Gets or sets the outcome of the test execution.
public TestOutcome Outcome { get; set; }
Property Value
Retry
Gets or sets retry metadata if the test is configured for retry.
public RetryMetadata? Retry { get; set; }
Property Value
Remarks
Null if the test does not have retry configuration. Contains retry attempt information, max retries, and retry strategy details when the test is executed with a retry mechanism. Helps identify flaky tests that pass only after retry attempts and enables analysis of retry patterns and test reliability issues.
SessionContext
Gets or sets the session context for this test execution.
public TestSession? SessionContext { get; set; }
Property Value
Remarks
When sending batches of executions, only the first execution in the batch contains the complete session context. Subsequent executions have this set to null to optimize payload size, as they share the same session context. The server rehydrates the context for all executions in the batch.
StackTrace
Gets or sets the stack trace if the test failed.
public string? StackTrace { get; set; }
Property Value
StackTraceHash
Gets or sets a stable hash of the stack trace for grouping similar failures.
public string? StackTraceHash { get; set; }
Property Value
Remarks
This hash enables grouping of test failures with identical or similar stack traces, helping identify common failure locations and patterns in the codebase. The hash is computed using SHA256 for stability and collision resistance.
StartTimeUtc
Gets or sets the start time of the test execution in UTC.
public DateTime StartTimeUtc { get; set; }
Property Value
TestName
Gets or sets the test name.
public string TestName { get; set; }