chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
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.

asked by lgolding@microsoft.c (4k points)

2 Answers

0 votes
Unfortunately due to a bug currently you must install Isolator at least once on the server machine for AutoDeploy to work.

In order for your solution to work just install Isolator on the server machine then uninstall it. After that you'll be able to run your MSBuild task.
answered by dhelper (11.9k points)
0 votes
I will try that, but I don't think that's the problem, because I have successfully run these unit tests on machines on which TypeMock has never been installed.

I'll let you know what happens.

answered by lgolding@microsoft.c (4k points)