Table of Contents

Class RetryAttribute

Namespace
NUnit.Framework
Assembly
nunit.framework.dll

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 int

The 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 TestCommand

The command to be wrapped

Returns

TestCommand

The wrapped command