dotCover failed to run unit tests with JustMock

Hi,
I have been using Telerik JustMock (2012.1.321.1) for my mocking framework.

Now I faced problems when trying to use dotCover to get code coverage results.
My unit tests are working just fine if I use e.g. ReSharper Unit Test Explorer and click 'Run Selected Tests'-button.
But selecting Cover Unit Tests with dotCover results this error for every test where I have JustMock in use.
Unit tests without mocking need works correctly.

GetByObjectID_NonExistingValidID_ReturnsEmptyList : Failed

Test method Granlund.RYHTI.Model.UnitTest.KSP.KSPAlarmThresholdWorkerTest.GetByObjectID_NonExistingValidID_ReturnsEmptyList threw exception:
Telerik.JustMock.MockException: Profiler must be enabled to mock/assert target KSPDBLayer.AlarmThreshold_Get() method.
at Telerik.JustMock.Handlers.InterceptorHandler.Create(Object target, MethodInfo methodInfo, Boolean privateMethod)
at Telerik.JustMock.MockContext`1.SetupMock(MockExpression`1 expression)
at Telerik.JustMock.MockContext`1.SetupMock(Expression`1 expression)
at Telerik.JustMock.Mock.<>c__DisplayClass1`1.<Arrange>b__0(MockContext`1 x)
at Telerik.JustMock.MockContext.Setup(Instruction instruction, Func`2 function)
at Telerik.JustMock.Mock.Arrange(Expression`1 expression)
at Granlund.RYHTI.Model.UnitTest.KSP.KSPAlarmThresholdWorkerTest.GetByObjectID_NonExistingValidID_ReturnsEmptyList()  in KSPAlarmThresholdWorkerTest.cs: line 69


This could also be Telerik's problem, but everything works before I try to start dotCover.
4 comments

Sampo, Edoardo,
Thank you for the feedback.
We've already contacted JustMock team and will work together to resolve the issue.
Recently we've made integration with TypeMock, so I expect that we can use the same approach here.

0

Hello,

Just curious - have you made any progress with this?

0

Hi,

unfortunately no progress yet... And my trial license with dotCover is also now expired.
But if I get some indication about a fix from the Telerik side, I will try this again.

0

Please sign in to leave a comment.