I run TypeMock 5.2-based unit tests under Visual Studio Team System (VSTS) 2008's version of MSTest.exe. I run the tests in two environments:
1) On my local development machine, where TypeMock is installed.
2) On a centrally managed build machine, where TypeMock is not installed.
The build process is set up so that on my development machine, the unit tests run with the MSBuild task:
<Exec Command="TMockRunner.exe MSTest.exe [options] MyTests.dll"/>
whereas on the build machine, the unit test run with a sequence of MSBuild tasks:
<TypeMockRegister Company="MICROSOFT" License="xxxx-xxxx-xxxx-xxxx-xxxx" AutoDeploy="true" />
<TypeMockStart LogPath="$(TypeMockLogPath)" />
<Exec Command="MSTest.exe [options] MyTests.dll"/>
<TypeMockStop Undeploy="true" />
The unit test run configuration is set up to acquire code coverage data during the tests, using VSTS's native code coverage capabilities. The installed copy of TypeMock on my machine is -not- "linked" to any code coverage tool. I assume that when TypeMock is autodeployed on the build machine, it is also not linked to a code coverage tool.
This setup has always worked for me in the past. But now I am seeing a problem where the unit tests pass on my development machine, but they all fail on the build machine, with the message:
*** Typemock Isolator needs to be linked with Coverage Tool to run, to enable do one of the following:
1. link the Coverage tool through the Typemock Isolator Configuration
2. run tests via TMockRunner.exe -link
3. use TypeMockStart tasks for MSBuild or NAnt with Link
For more information consult the documentation (see Code Coverage with Typemock Isolator topic).
I have done alot of work on our build process lately, so obviously I changed something to break this. But I don't know where to start looking to figure out what it could be.