This is a migrated thread and some comments may be shown as answers.

NCover

3 Answers 86 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 19 Dec 2011, 05:05 AM
Hi,

Is it possible to run the commercial version of JustMock together with NCover for sealed classes?

If so, how is this done? When we try to run them together the unit tests all fail because it can't create the mocked objects


Craig

3 Answers, 1 is accepted

Sort by
0
Ricky
Telerik team
answered on 20 Dec 2011, 10:48 AM
Hi Craig,

Thanks again for bringing up the question. Before you run the tests with JM commercial features using NCover, you need to make sure that the following two variables are set properly:

COR_ENABLE_PROFILING=0x1
COR_PROFILER={D1087F67-BEE8-4f53-B27A-4E01F64F3DA8}

Generally, you can do this by create a simple *.bat file that will first set the environment variables before running the tests. I would also recommend you to take a look at the following section in online documentation:

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

Finally, there is a tiny tool that I have created to run JustMock outside of visual studio, you can check it out to pipe NCover along with the test assemblies over a test framework.

http://weblogs.asp.net/mehfuzh/archive/2011/05/24/running-justmock-profiler-outside-of-visual-studio.aspx

Hope this solves your problem.

Kind regards,
Mehfuz
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Craig
Top achievements
Rank 1
answered on 20 Dec 2011, 08:03 PM
Thanks Mehfuz,

We had looked at the documentation you mentioned, but these two variables are not mentioned.


Craig
0
Ricky
Telerik team
answered on 22 Dec 2011, 12:28 PM
Hi Craig,

Thanks for your reply. Yes these two variables are not mentioned in the documentation as generally we don’t recommend playing with them but in some special cases those are to be dealt manually.

However, I would ask the documentation team to include those two variables in some part of the manual if you would like to set them manually.

Kind Regards,
Mehfuz
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
General Discussions
Asked by
Craig
Top achievements
Rank 1
Answers by
Ricky
Telerik team
Craig
Top achievements
Rank 1
Share this question
or