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
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
Im trying to do a manual "installation" of isolator and run my tests through TMockRunner and NUnit or NAnt and NUnit. Neither is working

I've run the msi-install on my computer and copied all the files from installationdirectory to my build server.

I get the same error through both NAnt and TMockRunner

TypeMock.TypeMockException :
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 invoke TMockRunner like this
TMockRunner.exe -link none -target 3.5 C:NUnit-2.5.5.10112in et-2.0 unit-console.exe gl.dot.Tests.dll

And my NAnt script is very simple
<?xml version="1.0"?>
<project name="Typemock Isolator Examples" default="test" basedir=".">
  <property name="nunit" value=" C:NUnit-2.5.5.10112in
et-2.0
unit-console.exe" />
  <property name="typemock.dir" value="D:DataReposdotglgl.dot.TestsinRelease" />
  
  <target name="test">
    <loadtasks assembly="${typemock.dir}TypeMock.NAntBuild.dll" />
    <typemockregister company ="10 Day Evaluation" license="K6DD-A^7G-3739-6L68-A9BC"/>
    <typemockstart/>
    
    <exec program="${nunit}" failonerror="true">
      <arg value="gl.dot.Tests.dll" />
    </exec>

    <typemockstop/>
  </target>
</project>


I've done some debugging and it seems like the EnvironmentVariable TMOCK_PID isn't set. When setting it manually in my TextFixtureSetup i just end up getting another error.

No method calls found in recording block. Please check:
* Are you trying to fake a field instead of a property?
* Are you are trying to fake mscorlib type?

and its no matter what i try to Isolate, both .Net types or own custom classes and methods.

I find it a bit frustrating that there seems to be so many dependencies, it makes it a pain to setup and use on build servers and small custom buildscripts.
asked by burningice (640 points)

3 Answers

0 votes
The situation you're describing can occur if is Isolator already installed on the computer at another location. Try to uninstall Isolator from your computer before running your NAnt task.
answered by igal (5.7k points)
0 votes
Typemock is not installed on the computer where im running the task from. Thats the whole point of my exercise, to try get it running without any installation :)

I did read the guide for Microsoft Moles and it states that one of the dll's HAS to be registered in GAC, its not enough to have it locally in the application folder. Is there any such constraints on TypeMock?

Is there a guide/list anywhere listing all the pre-requests needed to use TypeMock without installing?
answered by burningice (640 points)
0 votes
Please take a look at this page regarding the required files for AutoDeploy.

AutoDeploy takes care of placing the required DLLs in the GAC, as well as registration of the profilers in the registry. You still, however, must refer to the Typemock AAA assembly from a common location.
answered by igal (5.7k points)
...