The profiler must be enabled to mock, arrange or execute the specified target.

11 posts, 0 answers
  1. Pradeep
    Pradeep avatar
    2 posts
    Member since:
    Jun 2013

    Posted 19 Jun 2013 Link to this post

    Hello There,

    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.
    Result StackTrace:
    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 Telerik.JustMock.Mock.—.ˆŸ()
       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

  2. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 19 Jun 2013 Link to this post

    Hello Pradeep,

    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.

    Regards,
    Kaloyan
    Telerik
    Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
  3. DevCraft R3 2016 release webinar banner
  4. Pradeep
    Pradeep avatar
    2 posts
    Member since:
    Jun 2013

    Posted 19 Jun 2013 Link to this post

    Thank you for the Reply.
    I was looking out for Code analysis on VS 2012 with Just Mock. 
  5. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 20 Jun 2013 Link to this post

    Hello Pradeep,

    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.

    Regards,
    Kaloyan
    Telerik
    Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
  6. Brandon
    Brandon avatar
    10 posts
    Member since:
    Oct 2012

    Posted 30 Sep 2013 Link to this post

    Hi Kaloyan -

    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?

    Thanks!
    Brandon
  7. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 01 Oct 2013 Link to this post

    Hi Brandon,

    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.

    Regards,
    Kaloyan
    Telerik
    Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
  8. Brandon
    Brandon avatar
    10 posts
    Member since:
    Oct 2012

    Posted 01 Oct 2013 Link to this post

    I updated to the latest version of JustMock, I now have 2013.2 724 and this does not resolve the aforementioned issue.  I'll submit a support ticket.

    Thank you-
    Brandon
  9. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 02 Oct 2013 Link to this post

    Hi Brandon,

    I have replied to you in ticket with ID: 742671

    Regards,
    Kaloyan
    Telerik
    Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
  10. Hector
    Hector avatar
    1 posts
    Member since:
    May 2015

    Posted 08 May 2015 Link to this post


      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.

  11. Brandon
    Brandon avatar
    10 posts
    Member since:
    Oct 2012

    Posted 08 May 2015 in reply to Hector Link to this post

    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?

     

    Thanks-

    Brandon

     

     

     

     

     

  12. Stefan
    Admin
    Stefan avatar
    198 posts

    Posted 12 May 2015 Link to this post

    Hello Hector,

    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.

    Regards,
    Stefan
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top
DevCraft R3 2016 release webinar banner