MbUnit, repeating tests.
MbUnit (2.3 onwards) has support for repeating tests either in the same thread or in concurrent threads.
[Test][Repeat(10)] // this will make the RepeatedTest executed 10 timespublic void OneThreadRepeatedTest(){ ... }[Test][ThreadedRepeat(10)] // this will make the RepeatedTest executed in 10 concurrent threadspublic void ConcurrentThreadRepeatedTest(){ ... }
How this is used needs careful consideration when used with other method attributes e.g.
[Test][Repeat(10)][ExpectedException(typeof(Exception))]public void RepeatAndThrow(){ ... }[Test][ExpectedException(typeof(Exception))][Repeat(10)]public void ThrowWhileRepeating(){ ... }
Here RepeatAndThrow will run the test 10 times and expect each test to throw an exception. However ThrowWhileRepeating will also run 10 times and expect at least 1 of the tests to throw an exception.