TestContext.TestRunCount Property

Definition

Gets the current attempt of the test run. This property is relevant when using RetryAttribute (or any implementation of RetryBaseAttribute). On the first run, this property is set to 1. On subsequent retries, the value is incremented.

public int TestRunCount { get; }
member this.TestRunCount : int
Public ReadOnly Property TestRunCount As Integer

Property Value

Applies to