Running Visual Studio 2010 with MSTest and TypeMock Isolator 6.0.2.
I have a test class with a bunch of test methods, some of these test methods use mocking while others don't. If I run the tests that do not use TypeMock while having the [ClearMocks] attribute at the test class, there is still a significant overhead to the unit tests. The overhead is in the order of 6-10 seoncds per test method, but it seems to correlate with the amount of code that is run from the unit test. This overhead disappear if I remove the [ClearMocks] attribute. I have not been able to determine what triggers this overhead, I can only see that neither the test methods, the TestInitialize nor the TestCleanup methods use TypeMock.
Furthermore, If I replace this [ClearMocks] attribute with MockManager.ClearAll() in the TestCleanup method, then the overhead also practically dissappears.
Finally, the overhead is only there when I run the tests through Visual Studio. If I run them from the command line with TMockRunner MSTest (...) then the overhead is gone.
Is this a known issue with running tests from within Visual Studio or am I doing something wrong?