How do I increase the default execution timeout for my unit tests? I have a unit test which calls a web service. It often runs for longer than 10 seconds, which produces a timeout error. I’m using Visual Studio Team System 2008.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are a bunch of different ways to control the timeouts of unit tests in visual Studio. See this article for guidance: How to: Set Time Limits for Running Tests. (The article is written for 2010, but I verified that the settings exist in 2008 as well.)
As an aside, calling a real Web Service from a unit test is generally not recommended. You would be better off using a mocking framework (like Rhino Mocks) and dependency inversion to construct your code in such a way that you can test without requiring a connection to a real service.