Question

In NUnit I can add a [Timeout(5000)] attribute at the TestFixture (test class) level to specify an upper limit for each test method in that class.

In xUnit, I know I can do something similar, but at the test method level: [Fact(Timeout=5000)].

My question is: can I apply a timeout at the test class level with xUnit ?

Was it helpful?

Solution

This may not be the answer you would like to see but for what it is worth ...

The recommendation here is to create your own replacement for FactAttribute which derives from FactAttribute and sets up any default values you want (like timeout).

Reference: http://xunit.codeplex.com/workitem/9727

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top