I have mstest TestClass
that contains 35 tests now and that might grow. Methods tested are often recursive (so there might be bug causing infinite loop), so I want to set timeout for those tests.
Is there a way (ideally an attribute) to set same timeout for all tests at one place? TimeoutAttribute
can only be used with methods, not classes. And I really don't like copying same TimeoutAttribute
35 times.
Alternatively, can I create my own Attribute
that can be used with class and that marks every method in that class with specified attribute?