简体   繁体   中英

VS2012 unit tests - which test is running?

I'm using Visual Studio 2012 and am using a solution which contains some unit tests.

Now when I'm running the tests it runs about 55 tests then hangs indefinitely.

So I'd like to see which test is currently running and stalling the whole build.

As far as I remember in VS2010 I could change some timeout setting, which would help, too, but I can't find this in 2012.

Sam this is a limitation of the experience in VS2012 making it difficult to detect the currently executing/hung/crashing test.

There are only workarounds that I can provide eg. divide and conquer the list of tests to narrow down on the hang, enable logs or stick a debugger.

I would suggest that you upvote this feature request on uservoice .

BTW the timeout setting still exists in VS2012 and can be set on each testmethod as an attribute eg. [Timeout(60000)]

To find out what test is currently running use TestContext.TestName . Log it at the start of each test in TestInitialize method or just look at the TestResults window.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM