We have just recently decided to try Typemock/Isolator with our
unit tests. I have been writing some tests utilizing just the basic features of Typemock/Isolator. The application we are developing is targeting .net 3.5 and relying heavily on Windows Process Activation hosted
WCF
WCF services. Thus,
development is being performed on Windows Server 2008 and the application will be hosted (at least the services) with Server 2008. In attempting to use Typemock/Isolator with Server 2008, I have encountered a halting issue.
We are using
NUnit (2.4.7) for unit tests,
NCover (2.1) for code coverage, NAnt for builds. We are attempting to run tests that use Type Mock and link them to NCover using the NCover2.0 link either in the configurator or from the command line, or even from MSBuild. For some reason every time we try, we get a coverage file with no results. Furthermore, in using the TypeMockStart element and attempting to run the 2.0 typemock example nunit tests (even on Server 2003) we have an error that TypeMock is not registered. Is this an issue with NCover 2.1 and TypeMock working together? Here's the NAnt build from the example attempt:
<target>
<typemockstart>
<ncover>
<typemockstop>
</target>
I've tried to run this same thing on three different machines (Server 2008, 2003, XP) and recieved the same result (below is the relevant part of the output):
TypeMockCoverage:
[typemockstart] Typemock Isolator Enterprise License - Maintenance will expire in 21 day(s)
[ncover] NCover.Console v2.1.0 (Administrator x86) - Code Coverage Analysis for .NET
[ncover] Copyright (c) 2008 Gnoso Inc.
[ncover]
http://www.ncover.com
[ncover] Registered to Customer #: 8173
[ncover] NCover Enterprise Edition (1 User)
[ncover] Command: C:Program FilesNUnit 2.4.7in
unit-console.exe
[ncover] Command Args: Examples.csharp.dll
[ncover] Working Directory: C:Program FilesTypemockTypemock IsolatorExamplesCSHARPinDebug
[ncover] Assemblies:
[ncover] ******************* Program Output *******************
[ncover] NUnit version 2.4.7
[ncover] Copyright (C) 2002-2007 Charlie Poole.
[ncover] Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
[ncover] Copyright (C) 2000-2002 Philip Craig.
[ncover] All Rights Reserved.
[ncover] Runtime Environment -
[ncover] OS Version: Microsoft Windows NT 5.2.3790 Service Pack 2
[ncover] CLR Version: 2.0.50727.1433 ( Net 2.0.50727.1433 )
[ncover] .F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F..F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F..F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F
[ncover] Tests run: 75, Failures: 73, Not run: 0, Time: 0.438 seconds
[ncover] Test Case Failures:
[ncover] 1) Examples.Tests.NUnit.NaturalMocks.Test1_Basic.MockTheFactoryAlways : TypeMock.TypeMockException :
[ncover] *** Typemock Isolator is not currently enabled.
[ncover] To enable do one of the following:
[ncover] * To run Typemock Isolator as part of an automated process you can:
[ncover] - run tests via TMockRunner.exe command line tool
[ncover] - use 'TypeMockStart' tasks for MSBuild or NAnt
[ncover] * To work with Typemock Isolator inside Visual Studio.NET:
[ncover] set Tools->Enable Typemock Isolator from within Visual Studio
[ncover] For more information consult the documentation (see 'Running' topic)
[ncover] at TypeMock.MockManager.Init(Boolean collectAllCalls)
[ncover] at TypeMock.MockManager.Init()
[ncover] at TypeMock.RecorderManager.a(RecordExpectations A_0)
[ncover] at TypeMock.RecordExpectations..ctor()
One other funny thing - I tried to uninstall 2.1 of NCover and install 2.0.0.1 or whatnot and still got the error. Upon further examination I see that the Profiler version of NCover being loaded is still 2.1.0.0 even though it is running the old console (this is after uninstalling and installing NCover 2.0):
Log from NCover:
(0x00000394) MESSAGE: Profiler Starting
(0x00000394) MESSAGE: NCover Profiler 2.1.0.0
(0x00000394) EVENT: Communications link established.
(0x00000394) MESSAGE: Ready for command input.
(0x00000394) EVENT: Verbose Logging Disabled
(0x00000394) EVENT: Logging Disabled
Please help. I've been working on this issue for days now.