Hi,
I just installed NCrunch and tests using JustMock Profiler fail. Is there a way to get them work together? Maybe it is possible to modify the way NCrunch is invoked. See also http://www.telerik.com/community/forums/justmock/general-discussions/issue-with-nunit-and-partcover.aspx
Remco NCrunch Developer
#756
16 Dec 2011 10:59 UTC
Hi Thorsten -
Thanks for posting! So far no support has been added for JustMock, though I believe this should be a simple process. I will see what I can do about adding it in a future release. I'm afraid I can't offer you a workaround as there is no configuration that can override the task runner used to host the test environment.
Cheers,
Remco
Thanks for posting! So far no support has been added for JustMock, though I believe this should be a simple process. I will see what I can do about adding it in a future release. I'm afraid I can't offer you a workaround as there is no configuration that can override the task runner used to host the test environment.
Cheers,
Remco
Remco NCrunch Developer
#998
01 Feb 2012 00:21 UTC
For anyone interested, support for JustMock has been added to the 1.37b release that went out this morning. There are no configuration steps required for this - NCrunch should automatically adapt and configure itself.
Deleted post
#1017
01 Feb 2012 11:26 UTC
Deleted post
#1018
01 Feb 2012 11:26 UTC
Hi Remco,
JustMock support seems not to be working in current version (1.39.0.15b) anymore. I get a Telerik.JustMock.MockException : Profiler must be enabled. Running my tests inside ReSharper Testrunner succeeds.
Regards,
Thorsten
JustMock support seems not to be working in current version (1.39.0.15b) anymore. I get a Telerik.JustMock.MockException : Profiler must be enabled. Running my tests inside ReSharper Testrunner succeeds.
Regards,
Thorsten
Remco NCrunch Developer
#2117
08 Jun 2012 08:29 UTC
Hi Thorsten,
Can you share any more information about the version of JustMock you're using? Did this problem surface immediately after upgrading NCrunch?
Can you share any more information about the version of JustMock you're using? Did this problem surface immediately after upgrading NCrunch?
I'm currently using JustMock Q1 2012 SP1 (2012.1.508.6) and I'm unfortunately not quite sure if the problem occurs after upgrading NCrunch or JustMock.
Remco NCrunch Developer
#2120
08 Jun 2012 11:08 UTC
Thanks - I'll give it a try and will get back to you!
Remco NCrunch Developer
#2121
08 Jun 2012 11:15 UTC
Something I noticed before looking into this in detail: http://gimparm.blogspot.co.nz/2012/03/telerik-justmock-enabling-profiler-from.html
It appears that Telerik have introduced an extra environment variable in a new version. NCrunch doesn't supply this, so likely the auto integration will fail. The 1.40b release is getting quite close, so I'll see what I can do about including a fix for this. You may be able to work around the issue by creating your own proxy task runner .exe (as described in the blog above), and configuring NCrunch to use it by setting the 'Proxy process file path' option on your test projects.
It appears that Telerik have introduced an extra environment variable in a new version. NCrunch doesn't supply this, so likely the auto integration will fail. The 1.40b release is getting quite close, so I'll see what I can do about including a fix for this. You may be able to work around the issue by creating your own proxy task runner .exe (as described in the blog above), and configuring NCrunch to use it by setting the 'Proxy process file path' option on your test projects.
Edited 08 Jun 2012 11:18 UTC
Remco NCrunch Developer
#2144
11 Jun 2012 23:00 UTC
Hi Thorsten -
I've been having difficulty reproducing the problem you've described while using the same version of NCrunch/JustMock, and I'm wondering if there may be something in your environment that's surfacing a problem.
When your tests are running with NCrunch and JustMock, do you see a 'nCrunch.JustMockProxyProcess.exe' process running anywhere inside windows task manager?
I've been having difficulty reproducing the problem you've described while using the same version of NCrunch/JustMock, and I'm wondering if there may be something in your environment that's surfacing a problem.
When your tests are running with NCrunch and JustMock, do you see a 'nCrunch.JustMockProxyProcess.exe' process running anywhere inside windows task manager?
Just installed JustMock trial and have experienced the same issue as Thorsten (Resharper works just fine with JustMock).
I'm using the latest versions of JustMock and NCrunch:
* JustMock Q2 2012 (2012.1.608.2)
* NCrunch 1.40b
* Visual Studio 2010 with SP1
I didn't found 'nCrunch.JustMockProxyProcess.exe' running inside windows task manager when running JustMock tests with NCrunch.
I'm using the latest versions of JustMock and NCrunch:
* JustMock Q2 2012 (2012.1.608.2)
* NCrunch 1.40b
* Visual Studio 2010 with SP1
I didn't found 'nCrunch.JustMockProxyProcess.exe' running inside windows task manager when running JustMock tests with NCrunch.
Remco NCrunch Developer
#2584
07 Aug 2012 08:44 UTC
Hi Yanglee, thanks for posting!
Do you have any references from your test project to a Telerik.JustMock.dll? NCrunch looks for a reference to this assembly in order to determine whether to use the JustMock proxy process. I'm wondering if its possible that the version of JustMock you're using perhaps doesn't require this DLL or maybe uses something different?
Do you have any references from your test project to a Telerik.JustMock.dll? NCrunch looks for a reference to this assembly in order to determine whether to use the JustMock proxy process. I'm wondering if its possible that the version of JustMock you're using perhaps doesn't require this DLL or maybe uses something different?
Hi Remco,
Yes, I have added reference from test project to Telerik.JustMock.dll. And also enabled JustMock in Visual Studio via menu > Telerik > JustMock > Enable JustMock.
See the following example. NCrunch throws exception at line 20, while Resharper works just fine.
External image
Yes, I have added reference from test project to Telerik.JustMock.dll. And also enabled JustMock in Visual Studio via menu > Telerik > JustMock > Enable JustMock.
See the following example. NCrunch throws exception at line 20, while Resharper works just fine.
External image
Remco NCrunch Developer
#2591
07 Aug 2012 10:45 UTC
On your NCrunch project-level configuration, you'll find an option called 'Proxy process file path'.
Underneath your NCrunch installation directory (normally C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2010), you'll find a file called 'nCrunch.JustMockProxyProcess.exe'.
What happens if you set the 'Proxy process file path' to be the absolute file path of the just mock proxy process executable? Note that you'll need to do this for each project that uses JustMock in its test environment.
Underneath your NCrunch installation directory (normally C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2010), you'll find a file called 'nCrunch.JustMockProxyProcess.exe'.
What happens if you set the 'Proxy process file path' to be the absolute file path of the just mock proxy process executable? Note that you'll need to do this for each project that uses JustMock in its test environment.
I followed your instruction, now I can see 1~4 instances of nCrunch.JustMockProxyProcess.exe in Windows Task Manager when running JustMock tests with NCrunch.
But I still get the same exception as above. I tried to restart Visual Studio, but same issue.
But I still get the same exception as above. I tried to restart Visual Studio, but same issue.
Remco NCrunch Developer
#2595
07 Aug 2012 22:03 UTC
Thanks for trying this. The existence of the proxy processes means that NCrunch should now be properly hosting the JustMock profiler but the profiler is not properly initialising itself within the test process. This is the same problem that Thorsten has been reporting and I have so far been unable to reproduce it locally.
I'm afraid that there may very be little I can do to fix this. The original integration with JustMock was done roughly a year ago, and since then there have been new versions of JustMock with apparently large differences in how the integration needs to work. Hosting 3rd party profilers within the NCrunch test process has proven to be complex and difficult to stabilise for all environments and profiler versions. Considering the amount of time that has been spent (and apparently wasted) by trying maintain these integration points, I need to make a strategic decision and look at putting time towards other things that are sure to make NCrunch a better product for a wider range of users.
I'll leave the existing integration in place in the hope that it may work for others who are running earlier versions of JustMock/TypeMock, but as of this time the integration with JustMock and TypeMock with NCrunch is no longer officially supported.
I'm sorry if this causes issues with your development.
Cheers,
Remco
I'm afraid that there may very be little I can do to fix this. The original integration with JustMock was done roughly a year ago, and since then there have been new versions of JustMock with apparently large differences in how the integration needs to work. Hosting 3rd party profilers within the NCrunch test process has proven to be complex and difficult to stabilise for all environments and profiler versions. Considering the amount of time that has been spent (and apparently wasted) by trying maintain these integration points, I need to make a strategic decision and look at putting time towards other things that are sure to make NCrunch a better product for a wider range of users.
I'll leave the existing integration in place in the hope that it may work for others who are running earlier versions of JustMock/TypeMock, but as of this time the integration with JustMock and TypeMock with NCrunch is no longer officially supported.
I'm sorry if this causes issues with your development.
Cheers,
Remco
Understood. Thanks for your detailed reply.
This issue doesn't affect me much as I have used JustMock trial version only a few hours :)
Cheers,
Yang
This issue doesn't affect me much as I have used JustMock trial version only a few hours :)
Cheers,
Yang
Edited 07 Aug 2012 23:00 UTC
Dear Remco,
are there any news or plans regarding the support of JustMock in the future?
I would really like to use NCrunch (as a commercial license), as I love the way it works in the background.
But I heavily relay on a Mocking Framework for legacy code base.
best regards
Bernhard
are there any news or plans regarding the support of JustMock in the future?
I would really like to use NCrunch (as a commercial license), as I love the way it works in the background.
But I heavily relay on a Mocking Framework for legacy code base.
best regards
Bernhard
Remco NCrunch Developer
#3015
19 Oct 2012 10:42 UTC
Hi Bernhard,
Thanks for your interest in NCrunch. I'm sorry to say that I haven't found a way to resolve the above problem from the side of NCrunch, so unless it's somehow solved in JustMock, I don't think there will be a solution to this in the immediate future.
JustMock does still work with non-elevated functions inside the NCrunch test runner, although as you've mentioned you're using it for mocking with legacy code, my guess is that the elevated functions are probably very important for your situation.
I'll post any updates here as/if I become aware of them.
Thanks again,
Remco
Thanks for your interest in NCrunch. I'm sorry to say that I haven't found a way to resolve the above problem from the side of NCrunch, so unless it's somehow solved in JustMock, I don't think there will be a solution to this in the immediate future.
JustMock does still work with non-elevated functions inside the NCrunch test runner, although as you've mentioned you're using it for mocking with legacy code, my guess is that the elevated functions are probably very important for your situation.
I'll post any updates here as/if I become aware of them.
Thanks again,
Remco
Post a reply
Log in to reply.