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

Using JustMock outside of test runners/ visual studio

1 Answer 16 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ben Jones
Top achievements
Rank 1
Ben Jones asked on 17 Dec 2015, 10:32 AM

I'm wondering whether I am simply trying to achieve the impossible, but.....

I have successfully mocked up some legacy code and able to run my tests. I have then built a simple WPF app to utilise the same mocking approach and publish the results (without using test fixtures)

However, when I try to run the app outside of visual studio, I get the following exception:

Telerik.JustMock.Core.ElevatedMockingException

Message=Cannot mock 'System.String get_blah()'. The profiler must be enabled to mock, arrange or execute the specified target.
       Source=Telerik.JustMock

I have checked the event viewer and the profiler is enabled.

Is this issue simply that this will never run outside of Visual Studio/any other test runner?

Ideally, we would like to be able to create a suite of automated regression testing apps for non-devs to use.

 

Kind Regards

 

ben

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 17 Dec 2015, 10:43 AM

Hello Ben,

When running outside of Visual Studio, you should follow the steps in our integration articles in the documentation.

My guess is that the actual event in the event log states that the profiler requested to not be activated. Most likely, the JUSTMOCK_INSTANCE environment variable isn't set at the point where you run the tests.

Regards,

Stefan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Ben Jones
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or