RetryAttribute Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This attribute is used to set a retry count on a test method in case of failure.
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
public sealed class RetryAttribute : Microsoft.VisualStudio.TestTools.UnitTesting.RetryBaseAttribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
type RetryAttribute = class
inherit RetryBaseAttribute
Public NotInheritable Class RetryAttribute
Inherits RetryBaseAttribute
- Inheritance
- Attributes
Retry |
Initializes a new instance of the RetryAttribute class with the given number of max retries. |
Backoff |
Gets or sets the delay backoff type. |
Max |
Gets the number of retries that the test should make in case of failures. Note that before RetryAttribute is considered, the test was already executed once. This property determines the max number of retries after the first normal run. |
Milliseconds |
Gets or sets the delay, in milliseconds, between retries. This delay is also applied after the first run and before the first retry attempt. |
Execute |
Retries the test method. The details of how retry is done is left to the derived classes. Note that a first run of the method was already executed and failed before this method is called. (Inherited from RetryBaseAttribute) |
Tuote | Versiot |
---|---|
MSTest.TestFramework | 3.8.0 |
Tuotteen .NET palaute
.NET on avoin lähdekoodi projekti. Anna palautetta valitsemalla linkki: