I have just upgraded JustMock Q2, 2013. I have around 60+ unit test cases. If I run all of them they are successful. But if I run Code Coverage around 40+ are failing and the common error message for all these failed test cases is as below. Is this still a bug in Q2.
Before Q2 2013 release i was not even able to run all the test cases at a time. I have to run part by part to make them pass.
By the way I have enable Profiler under telerik menu in VS 2012.
Telerik.JustMock.Core.ElevatedMockingException: Cannot mock 'Telerik.Windows.DragDrop.DragEventArgs'. The profiler must be enabled to mock, arrange or execute the specified target.
at Telerik.JustMock.Core.MocksRepository.Create(Type , Object , IEnumerable`1 , IEnumerable`1 , IEnumerable`1 , Type , Boolean , Boolean , IEnumerable`1 )
at ..Create(MocksRepository , Type , Object , Nullable`1 , Type , Nullable`1 , IEnumerable`1 , List`1 , List`1 , List`1 )
at ..(Func`1 )
at Telerik.JustMock.Mock.Create[T](Constructor constructor)
at Project.Modules.Content.Test.ContentViewModelTest.Content_ContentViewModel_AddDatePicker_ArePropertiesAdded() in c:\Project\Dev\Source\Client\UnitTest\Project.Modules.Content.Test\ContentViewModelTest.cs:line 339
10 Answers, 1 is accepted
Thank you for contacting Telerik support.
If you are trying to integrate Telerik JustMock with the Visual Studio 2012 Code Coverage, it is expected to see such exception. This is due to the fact, currently JustMock and the VS2012 Code Coverage profiler don`t play well together.
However, we are working on this and the VS2012 Code Coverage support feature should be included in one of the next JustMock official releases (should note that, internal builds also count as official :)). Until then, the only way to use our product is with disabled code coverage from VS.
If the above happens to not be the case or you are trying integrate JustMock with some other code coverage tool, you should check this article. There, you will be able to see which of the code coverage tools are supported in JustMock and how to configure them.
I hope this helps. Please, contact us further if you need more help.
I was looking out for Code analysis on VS 2012 with Just Mock.
This will also be included in the next official JustMock release. JustMock 2013 Q2 SP1 is scheduled for the middle of July, however it is very possible to have an internal JustMock build (containing these features) even before this.
I hope this answers your question.
I've been experiencing the same issue with JustMock and VS2012. Has this issue been addressed in a release yet? If yes- which release will have the fix?
I recommend you downloading our latest official release (JustMock 2013.3.904 IB). With it, you will be able to link JustMock with other 3rd party profiler using tools (this is better described here).
Note that, in order to use JustMock along with the Visual Studio 2012 Code Coverage (IntelliTrace) you need to have at least Visual Studio Update 2 installed. Using a prior VS version won't let you integrate the profilers.
I hope this helps. Let me know if there are further issues or there is something else I can assist you with.
We are currently interested in using JustMock for our
software unit testing and would like to know whether JustMock
supports the Visual Studio Code Coverage tool. If it does not
support it are there any plans of supporting it in future releases.
What Code coverage tools are currently supported by JUSTMOCK.
Hey Hector --
I would actually advise against using JustMock. We started using it because we were interested in the Future Mocking capabilities after Microsoft stopped supporting Moles. As we've grown and matured though, we realized the Future Mocking is more of a crutch for allowing us to continue to write untestable code. Now we aim write code that is more testable using best practices such as IOC containers and dependency injection. This allows us to write unit tests without the need for a third party mocking tool - simply by creating our own test doubles that we can inject into the seams we've defined. Nothing runs faster than actual code.
As we've grown our unit test suite, we've had to create standards on how fast our unit tests should run. Ideally, each test should run under 10ms, but the standard is set for 100ms. Unfortunately, JustMock doesn't perform as fast we need it - causing huge delays on unit tests that use it. Futher, version updates to JustMock has caused us huge pain points when upgrading as sometimes the version updates were causing breaking changes to our unit tests suite.
I used to be a huge proponent for JustMock within our organization. But after so many headaches, I can't continue to turn a blind eye to it. I heard good things about MOQ from my counterparts within my organization. Maybe check that out?
JustMock supports Visual Studio Code Coverage, but it is not enabled by default. Integration is enabled through the JustMock configuration tool accessible from the JustMock menu in Visual Studio. It also supports the latest versions of dotTrace, OpenCover, NCover and TestDriven.NET as well as a few less popular tools.
See What's Next in App Development. Register for TelerikNEXT.