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

OpenCover + Xunit + JustMock Pro Seems to switch Profiler ID on run

2 Answers 99 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 13 May 2015, 01:50 PM

@SET JUSTMOCK_INSTANCE=1
@SET COR_ENABLE_PROFILING=1
@SET COR_PROFILER={B7ABE522-A68F-44F2-925B-81E7488E9EC0}

When I run XUNIT, this works fine. : 

xunit.console %TestsDLL% -nunit %ReportDirectory%\%CurrentProjectRunning%.%ldt%.xml

Results: 

.NET Runtime version 4.0.30319.0 - The profiler was loaded successfully.  Profiler CLSID: '{B7ABE522-A68F-44F2-925B-81E7488E9EC0}'.  

 No error the profiler seems to work. 

 

When I run XUNIT from OpenCover it seems to lose these settings?

 OpenCover.console.exe -target:"c:\xunitrunner\xunit.console.exe" -mergebyhash -filter:"+[*]*" -targetargs:"%TestsDLL% -nunit %ReportDirectory%\%CurrentProjectRunning%.%ldt%.xml"  -output:%ReportDirectory%\%ldt%coverage.xml -register:user

Results:

.NET Runtime version 4.0.30319.0 - The profiler was loaded successfully.  Profiler CLSID: '{1542C21D-80C3-45E6-A56C-A9C1E4BEB7B8}'.  

With this error:
The profiler must be enabled to mock, arrange or execute the specified target.
Detected active third-party profilers:
* OpenCover (from process environment)
Disable the profilers or link them from the JustMock configuration utility. Rest
art the test runner and, if necessary, Visual Studio after linking.

 

2 Answers, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 13 May 2015, 04:19 PM

Looks like the OpenCover.DLL's were moved, but still showing in the JustMock "Easy Linking" profiler screens.

Seem to have gotten by it just starting from scratch on registering again.  Now I don't get the Mock errors on opencover runs.

 

 

0
Kaloyan
Telerik team
answered on 18 May 2015, 08:25 AM
Hello Mark,
 
I am glad to hear that you have been able to resolve the issue by yourself. Further, just in case, here is the JustMock's OpenCover integration article. I hope it helps.

Regards,
Kaloyan
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
Mark
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Kaloyan
Telerik team
Share this question
or