Table of Contents

Class TimeoutAttribute

Namespace
NUnit.Framework
Assembly
nunit.framework.dll

Used on a method, marks the test with a timeout value in milliseconds. The test will be run in a separate thread and is cancelled if the timeout is exceeded. Used on a class or assembly, sets the default timeout for all contained test methods.

[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class TimeoutAttribute : PropertyAttribute, IApplyToTest, IApplyToContext
Inheritance
TimeoutAttribute
Implements
Inherited Members

Constructors

TimeoutAttribute(int)

Construct a TimeoutAttribute given a time in milliseconds

public TimeoutAttribute(int timeout)

Parameters

timeout int

The timeout value in milliseconds