Class RetryAttribute
Specifies that a test method should be rerun on failure up to the specified maximum number of times.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class RetryAttribute : NUnitAttribute, IRepeatTest, ICommandWrapper
- Inheritance
-
RetryAttribute
- Implements
- Inherited Members
Constructors
RetryAttribute(int)
Construct a RetryAttribute
public RetryAttribute(int tryCount)
Parameters
tryCount
intThe maximum number of times the test should be run if it fails
Methods
Wrap(TestCommand)
Wrap a command and return the result.
public TestCommand Wrap(TestCommand command)
Parameters
command
TestCommandThe command to be wrapped
Returns
- TestCommand
The wrapped command