Class RetryAttribute
Specifies that a test method should be rerun on failure up to the specified maximum number of times.
Inherited Members
Namespace: NUnit.Framework
Assembly: nunit.framework.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class RetryAttribute : NUnitAttribute, IRepeatTest, ICommandWrapper
Constructors
View SourceRetryAttribute(int)
Construct a RetryAttribute
Declaration
public RetryAttribute(int tryCount)
Parameters
Type | Name | Description |
---|---|---|
int | tryCount | The maximum number of times the test should be run if it fails |
Methods
View SourceWrap(TestCommand)
Wrap a command and return the result.
Declaration
public TestCommand Wrap(TestCommand command)
Parameters
Type | Name | Description |
---|---|---|
TestCommand | command | The command to be wrapped |
Returns
Type | Description |
---|---|
TestCommand | The wrapped command |