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
Using the Typemock FinaBuilder Actions doesn't work.
When loading or executing a FinalBuilder Typemock Action it can not load the VSoft.CustomActionApi.dll because the Typemock Action references Version 1.0.0.0 of VSoft.CustomActionApi.dll.

We are using FinalBuilder 7, which has a VSoft.CustomActionApi.dll with Version 7.0.0.0.

Isolator Version: 6.0.10.0 and 6.1.2
OS: Windows 7, Windows Server 2003
asked by (3.1k points)

12 Answers

0 votes
Hi,

The action is working with FinalBuilder 6. FinalBuilder 7 is not supported yet by the action but you can use the TMockRunner as a solution.

In order to execute tests using FinalBuilder use the "Execute Program" and in the command line call TMockRunner.exe:

In the "Execute Program" set "Program File" to the path of TMockRunner.exe and the in the parameters use the command line of the test runner, for example: "nunit-console.exe MyTests.dll"

Please let me know if it helps.

Regards,
Elisha,
Typemock Support
answered by (12k points)
0 votes
Actually I did exactly that.
Unit testing and coverage analysis works so far. However as soon as it encounters a typmocked unit test ist says "Isolator is not enabled".

How would I enable Typemock ?
I configured Typemock on the build server through the GUI properly with a server license.
answered by (3.1k points)
0 votes
Can you paste here the complete command line you are running? If you are using a coverage tool in conjunction it (slightly) complicates things.

In any case, these are the command line switches you need to know, along with some examples: http://docs.typemock.com/Isolator/##typemock.chm/Documentation/TMockRunner.html

HTH
answered by (16.5k points)
0 votes
This is the command which I use in FinalBuilder. Whether I use the -register option or not makes no difference at all.

set UT="C:\pj\Test\UnitTest.dll"
set NUNIT="C:\Program Files (x86)\NUnit 2.5.9\bin\net-2.0\nunit-console-x86.exe"
set NCOVERCONSOLE="C:\Program Files (x86)\NCover\NCover.Console.exe"
set TMOCKRUNNER="%ProgramFiles(x86)%\Typemock\Isolator\6.0\TMockRunner.exe"
set TEMPFOLDER=C:\Temp\
%TMOCKRUNNER% -register "mycompany" "XXXX-XXXX-XXXX-XXXX-XXXX" -link NCover %NCOVERCONSOLE% //reg //w %TEMPFOLDER% //x %TEMPFOLDER%\NCoverage.xml //l %TEMPFOLDER%\NCover.log %NUNIT% %UT% /xml=%TEMPFOLDER%\Test.xml /nologo /labels
answered by (3.1k points)
0 votes
Finally I managed to create FinalBuilder 7 Custom Actions like Register TypeMock, Start TypeMock and Stop TypeMock similar to that you distribute in the TypeMock installation.

I let FinalBuilder execute this sequence of actions:
- Register TypeMock (our server license)
- Start TypeMock (Target .NET Framework 2.0)
- Typemock Runner as in my previous reply
- Stop TypeMock

This results in that output:

Errors and Failures:
1) Test Failure : aa.aa.aaaaaa.aaaa.UnitTest.Domain.MessageQueue.TestMessageQueue.Test_04_BlockedQueue_Dequeue
An unexpected exception type was thrown
Expected: aa.aa.aaaaaa.aaaa.Domain.Contract.MessageQueue.MessageQueueBlockedException
but was: TypeMock.TypeMockException :
*** Typemock Isolator is not currently enabled.
To enable do one of the following:

* To run Typemock Isolator as part of an automated process you can:
- run tests via TMockRunner.exe command line tool
- use 'TypeMockStart' tasks for MSBuild or NAnt

* To work with Typemock Isolator inside Visual Studio.NET:
set Tools->Enable Typemock Isolator from within Visual Studio

For more information consult the documentation (see 'Running' topic)
at gx.a()
at gx.c()
at TypeMock.MockManager.Init(Boolean collectAllCalls)
at TypeMock.MockManager.Init()
at TypeMock.MockManager.g(Type A_0)
at TypeMock.MockManager.Mock(Type type, Constructor mockConstructors)
at TypeMock.MockManager.a(Type A_0, Constructor A_1, Object[] A_2, Boolean A_3)
at TypeMock.MockManager.MockObject(Type type, Constructor mockConstructors, Object[] args)
at TypeMock.MockManager.MockObject[TMockedType](Constructor mockConstructors)
at TypeMock.ArrangeActAssert.InstanceFaker`1.e()
at TypeMock.ArrangeActAssert.InstanceFaker`1.c()
at g8.CreateFakeInstance[T](Members behavior, Constructor constructorFlag, Constructor baseConstructorFlag, Type baseType, Object[] ctorArgs)
at g8.Instance[T](Members behavior)
at g8.Instance[T]()
at aa.aa.aaaaaa.aaaa.UnitTest.Domain.MessageQueue.TestMessageQueue.Test_04_BlockedQueue_Dequeue() in d:\fb\trunk\SW\aaaaaa\aaaa\Test\UnitTest\Domain\MessageQueue\TestMessageQueue.g.cs:line 139

For me the ultimate question remains: What can I do to enable TypeMock ?
answered by (3.1k points)
0 votes
Hi,

Can you please tell me what version of ncover are you using?
Note that there different option to -link depending on on ncover version.
If for example you are using version 3 of ncover the command line for TMockRunner should be:
-link NCover3.0
answered by (35.5k points)
0 votes
We are using NCover 1.5.8
answered by (3.1k points)
0 votes
Hi,

Please add the -first flag before the -link flag:

TMockRunner -first -link NCover...
_________________
Regards

Yonatan,
TypeMock Support Group
answered by (1.6k points)
0 votes
I put the -first option onto the command line. Typemock is still not enabled.
answered by (3.1k points)
0 votes
I'd like to check with you some stuff related to correct registration of the profilers.
There are several things I'd like to go over with you, perhaps it would be best if we could do this in an online session? I could connect to your computer to try and troubleshoot this issue directly.

We are available Sunday thru Thursday, from 7 AM to 3 PM GMT. Please let me know when this is convenient for you.
answered by (5.7k points)
...