partcover.net4 icon indicating copy to clipboard operation
partcover.net4 copied to clipboard

PartCover Integration with JustMock

Open mehfuzh opened this issue 13 years ago • 8 comments

Hi Shaun, How are you doing ? I am creating this issue as a part of JustMock integration with your tool. We support PartCover but that requires some code changes in the PartCover itself described in the following online reference:

http://www.telerik.com/help/justmock/integration-partcover.html

I am sending this issue to ask you to make the changes in the official branch of the product so that users get more seamless experience using JustMock with Partcover.

Cheers, Mehfuz

mehfuzh avatar Sep 07 '11 09:09 mehfuzh

I see what you are doing but surely this environment variable should be set by the host process or even set it in the environment variables (user/system) of the process i.e. in the command line before you call PartCover via the console or the browser; the same way you would do so with Moles or TypeMock.

I am wary of adding an environment variable that is specific to a commercial product. Would you expect me to do the same to OpenCover (which handles 32 and 64 bit processes and also does branch coverage?). Have you made the same request to NCover; I see from your site that you don't need NCover to make changes to integrate - why is that - could the same approach be used for PartCover/OpenCover?

sawilde avatar Sep 07 '11 11:09 sawilde

Hi Shaun,

Thanks again for the quick reply. Integrating the same way we did it for NCover is one way. However I will talk with the team and keep you posted on any issues regarding it.

Cheers, Mehfuz.

mehfuzh avatar Sep 07 '11 11:09 mehfuzh

You might want to use a consistent approach for all profilers like NCover/PartCover/OpenCover in much the same way as Moles (or TypeMock) take as there may be other profilers out there that may need to work with your mocking tool which you are not aware currently aware of.

sawilde avatar Sep 07 '11 12:09 sawilde

Hi Shaun, Thanks for the info, We are also looking for a generic way to the problem but not using an intermediate tool (JustMockRunner.exe /TMockRunner.exe).

Will also keep you posted on that.

Cheers, Mehfuz

mehfuzh avatar Sep 09 '11 10:09 mehfuzh

The simplest way is to just have the user register the GUID/CLASSID of the chained profiler before calling your mock runner. A simple environment variable would suffice. Your users (who are developers) should be quite capable of this small step if they are looking to chain a profiler in line with the mocking tool. TypeMock I think uses a file and lists all the profilers they are compatible with but it is still user editable (see http://stackoverflow.com/questions/6698290/can-opencover-be-used-with-typemock-isolator) . Personally I'd keep it simple, developers aren't stupid, sometimes daft, but not stupid.

sawilde avatar Sep 09 '11 20:09 sawilde

Did you progress further with TypeMock and PartCover integration?

sawilde avatar May 17 '12 23:05 sawilde

You mean JustMock and PartCover ?

mehfuzh avatar May 22 '12 01:05 mehfuzh

Yup - sorry yes JustMock and PartCover (or OpenCover)

sawilde avatar May 22 '12 01:05 sawilde