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 experienced this before, but lately it was stable. Looks like I am having this problem again.

Scenario:
- Upgraded TypeMock Isolator to version 5.2 (in fact, 5.2.1 internal build that was sent to us)
- Upgraded TestDriven.NET to 2.18 beta
- Run "Run Tests" from TestDriven menu, works fine, all mocking is done.
- Run "Test with Coverage", NCover fails to generate coverage report.
- Check "Isolator Configuration". It is not linked to coverage tool. Link it to NCover
- Run "Test with Coverage", now TypeMock complains that it is not enabled.
- Check "Isolator Configuration" again. It still is not linked to coverage tool. Link it to NCover.

and so on, and so force. If I don't link TypeMock with NCover, coverage generation fails (and it should), if I link it, first time it complains that TypeMock is not enabled, after that it mysteriously unlinks TypeMock from NCover and then coverage generation fails again.

The problem occurs only from within Visual Stuidio, but it is painful enough.

What can be wrong? I remember I've seen it before.
asked by vagif (19.4k points)

24 Answers

0 votes
Well, it almost worked. Actually it worked once. But then...

I did all you suggested and can confirm that it worked and I managed to generate code coverage results.

Encouraged by this, I went ahead and installed the newest version of Isolator (5.2.1) - I temporarily switched to 5.1 during these tests.

This is what I am getting now:

Command: C:Program FilesTestDriven.NET 2.0ProcessInvocation.exe
Command Args: "/assemblyName:TestDriven.TestRunner.Server, Version=2.14.2190.0, Culture=neutral, PublicKeyToken=50ecb853f8c6b8d2" "/xmlName:M:TestDriven.TestRunner.Coverage.NCoverCoverageTestRunner.run(System.String,System.String,System.String,System.String,System.String)" "/parameter:tcp://127.0.0.1:4837/42ef8f25-67ac-4877-92e6-818c0f817ce9" "/parameter:tcp://127.0.0.1:4837/757278b6-d97a-4446-93e7-e6f762b1ab28" "/parameter:C:ProjectsNETTypeMockTestinDebugTypeMockTest.dll" "/parameter:T:TypeMockTest.MyClassTest" "/parameter"
Working Directory:
Assemblies:
Coverage Xml: C:Documents and SettingsagifLocal SettingsTempMutant DesignTestDriven.NET 2.0CoverageTypeMockTestCoverage0.xml
Coverage Log: Coverage.Log

Waiting for profiled application to connect...Connected
Profiled process terminated. Profiler connection not established.

NCover couldn't create a coverage report.

(I have registered and re-registered CoverLib.dll).
answered by vagif (19.4k points)
0 votes
Hi Vagif

We succeed reproducing this error.
It happens after upgrading from version 5.1 to 5.2.
We are checking how to fix it (simply uninstall and reinstall didn't help)
I'll get back to you as soon as we'll find the cure :)
answered by ohad (35.4k points)
0 votes
Ohad,

Thank you for following it up. Hope to get it fixed shortly. I have a presentation about mocking for Norwegian .NET User Group on February 24th and showing plan to show some code coverage. But we still have plenty of time :)
answered by vagif (19.4k points)
0 votes
I'm still having the same problems:

[ img ]

Running tests with TestDriven passess 8 tests, and fails 6.
Test with debugger passes 11 and fails 3.
Test with Typemock passes 8 and fails 6.
Test with Team coverage passes all 14 tests.

[ img ]

This is the result when running in ReSharper:

[ img ]

(Vagif where's the NNUG meeting?)
answered by Jan-Erik (1.4k points)
0 votes
Update: I had three instances of TestDriven running in the system tray. I stopped them all, and tried to run by using TestDriven again, and now all 14 tests passed...
answered by Jan-Erik (1.4k points)
0 votes
Jan-Erik, the NNUG meeting about mocking (and using TypeMock for this purpose) will be held in Oslo. You can watch www.nnug.no for updates.
answered by vagif (19.4k points)
0 votes
Hi Jan

Glad it worked 8)

One thing we should remind our users is when changing things related to the Isolator make sure that TestDriven process is not running.
The reason is that TestDriven 'holds' the assemblies that where loaded when it first runs. So if for example you change the reference to the Isolator assemblies TestDriven will run using the old assemblies unless you kill its process.
answered by ohad (35.4k points)
0 votes
We succeed reproducing this error.
It happens after upgrading from version 5.1 to 5.2.
We are checking how to fix it (simply uninstall and reinstall didn't help)
I'll get back to you as soon as we'll find the cure :)


Hi Ohad,

Are there any news with fix of this issue? Do you have an approximate time for release? The reason I ask is that I am planning a presentation where I would like to show TypeMock combined witih NCover. It will be in 3 weeks, but I just want to make sure I can include code coverage demo in it.
answered by vagif (19.4k points)
0 votes
Vagif,

I sent you a patch to try out earlier today, can you confirm you received the email? Can you try out the patch and let me know if it works?

Thanks,
Doron
Typemock Support
answered by doron (17.2k points)
0 votes
Hi,

I did not receive anything today, but I remember last time there was also a problem sending a patch to my corporate mail. Looks like it gets stopped. So you can try either send me download link instead or mail the patch to my Gmail address: vagif.abilov@gmail.com.

Vagif
answered by vagif (19.4k points)
...