In principle, to enable the JustMock profiler (regardless of use case) you just need to set 3 environment variables before the test run starts and unset them afterwards. The JustMock code activities make this process straightforward, but they're not absolutely necessary. The built-in TFS code activities are sufficient to set those variables, albeit not as straightforward.
JustMock also provides the JustMockRunner executable which can wrap any process start so that JustMock is enabled for that process. If you use this executable, then you don't have to muck with environment variables, but you will have to provide the full command line that starts VSTest and you won't be able to use the built-in code activity that already does that.
The code activity for TFS 2010 uses MSTest from Visual Studio 2010, and the code activity fort TFS 2012 uses MSTest from Visual Studio 2012 by default. You can override the MSTest executable for either code activity by setting the MsTestExecutable property of the code activity to the full path the the MSTest executable (MSTest.exe) on the build machine.
As for the experienced slow-down, I have a hunch that the slow-down is caused by our change of the default behavior for mocks from Behavior.Loose to Behavior.RecursiveLoose. My suggestion is that you profile your tests to determine the cause of the slow execution. It is likely caused by a few mocked types throughout your test cases. Changing the Create call from Mock.Create<T>() to Mock.Create<T>(Behavior.Loose) will speed-up the usage of that mock. Naturally, this is only an informed guess and the information from the profiling session should be used to determine the true cause.
If you use JustCode and the JustCode Unit Test Runner, then you can profile your tests right away
If you prefer to use only JustTrace, then you can use its unit test run integration
Do not forget to link the JustTrace and JustMock
profilers before profiling.
If you have any additional questions, please don't hesitate to ask.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.