Issue linking profiler to VS 2017/2019 Code Coverage/IntelliTrace

10 posts, 1 answers
  1. Don
    Don avatar
    2 posts
    Member since:
    Jun 2017

    Posted 06 Jun 2019 Link to this post

    I've recently upgraded to VS2019 and JustMock 2019.508.1 (we have a DevCraft license), and tests requiring elevated mode are no longer functioning. We receive the following error when only linking the VS 2019 Profiler with JustMock:

    Telerik.JustMock.Core.ElevatedMockingException: Telerik.JustMock.Core.ElevatedMockingException: Cannot mock 'EL.BusinessLayer.LegacyTaskCloseRequestEntity PostRentScheduleEntitiesToLegacy(EL.BusinessLayer.LegacyTaskCloseRequestEntity, System.String, System.String, System.String, System.String, System.Collections.Generic.ICollection`1[System.String])'. The profiler must be enabled to mock, arrange or execute the specified target.
    Detected active third-party profilers:
    * {9317ae81-bcd8-47b7-aaa1-a28062e41c71} (from process environment)
    Disable the profilers or link them from the JustMock configuration utility. Restart the test runner and, if necessary, Visual Studio after linking..

    That guid refers to the VS Code Coverage profiler, which does appear in the Telerik JustMock Configuration profiler list. However, when I select that profiler then the tests will no longer even start - the progress bar will display its green runner going from left to right, but none of the tests will ever start spinning and after a minute or two the progress bar just stops without displaying any errors or messages.

    We had also started .NET Core development in VS2017, and had found that we needed to add dotnet.exe to the Codeweaver ImageBlacklist.cfg file. The behavior we are seeing with tests not ever starting to run reminds me of that behavior with dotnet.exe, and I'm wondering if there is a new VS2019 executable for testing that needs to be added to that blacklist file?

  2. Answer
    Mihail
    Admin
    Mihail avatar
    264 posts

    Posted 10 Jun 2019 Link to this post

    Hello Don,

    Thank you for contacting us about this issue.

    We are aware that there is a problem with the integration with VS Code Coverage and we already have an bug report logged into our feedback portal. Here is a link if you would like to follow it and receive status updates: Code coverage not working with Visual Studio 2019. The title says VS 2019, but the problem is affecting other versions of VS as well.

    I am afraid that there is no workaround for this particular problem. You could expect a fix later this month.

    If you have further questions or comments feel free to write back to us.

    Regards,
    Mihail
    Progress 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
  3. Raviraj
    Raviraj avatar
    1 posts
    Member since:
    Feb 2010

    Posted 11 Jun 2019 Link to this post

    We are using JustMock with Visual Studio 2017 & .Net Framework 4.6.1 for mocking the non public method without any issues. However the same test case is failing when we migrate it into .Net Core 2.2. Please advise!

    The exception stack trace is below. 

     Informational] [xUnit.net 00:00:08.89]            at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    [6/6/2019 9:19:53 AM Informational] [xUnit.net 00:00:08.89]            at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    [6/6/2019 9:19:53 AM Error] [xUnit.net 00:00:08.91]     Should_Call_UpdateAuditableProperties [FAIL]
    [6/6/2019 9:19:53 AM Informational] [xUnit.net 00:00:08.92]       Telerik.JustMock.Core.ElevatedMockingException : Cannot mock 'Void UpdateAuditableProperties()'. The profiler must be enabled to mock, arrange or execute the specified target.
    Detected active third-party profilers:
    * C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Dynamic Code Coverage Tools\amd64\covrun64.dll (from process environment)
    Disable the profilers or link them from the JustMock configuration utility. Restart the test runner and, if necessary, Visual Studio after linking.
    [6/6/2019 9:19:53 AM Informational] [xUnit.net 00:00:08.92]       Stack Trace:
    [6/6/2019 9:19:53 AM Informational] [xUnit.net 00:00:08.92]            at Telerik.JustMock.Core.ProfilerInterceptor.ThrowElevatedMockingException(MemberInfo member)
    [6/6/2019 9:19:53 AM Informational] [xUnit.net 00:00:08.92]            at Telerik.JustMock.Core.MocksRepository.AddArrange(IMethodMock methodMock)

     

     

  4. Mihail
    Admin
    Mihail avatar
    264 posts

    Posted 12 Jun 2019 Link to this post

    Hello Raviraj,

    The problem you experience is reproduced when the VS Code Coverage is started. As I already said in my previous post, we are aware of this problem. In fact we started working on a fix. You could subscribe to the bug report item in the feedback portal to receive status updates: Code coverage not working with Visual Studio 2019

    Regards,
    Mihail
    Progress 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
  5. Peter
    Peter avatar
    3 posts
    Member since:
    Apr 2019

    Posted 07 Aug 2019 in reply to Mihail Link to this post

    Hi Mihail,

    I have JustMock version R2 2019 SP1 and I'm still experiencing this issue:

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

        Detected active third-party profilers:
        * {9317ae81-bcd8-47b7-aaa1-a28062e41c71} (from process environment)
        Disable the profilers or link them from the JustMock configuration utility. Restart the test runner and, if necessary, Visual Studio after linking.
    ```

  6. Ivo
    Admin
    Ivo avatar
    29 posts

    Posted 08 Aug 2019 Link to this post

    Hello Peter,

    The issue most probably was due to disabled integration with IntelliTrace. Please open JustMock Configuration tool and make sure that 'Visual Studio 2017/2019 Code Coverage/IntelliTrace' is checked as it shown below:



    I hope this information helps. If you need further assistance do not hesitate to write us back.

    Regards,
    Ivo
    Progress 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
  7. Peter
    Peter avatar
    3 posts
    Member since:
    Apr 2019

    Posted 08 Aug 2019 in reply to Ivo Link to this post

    Hi Ivo,

    That solved my issue. Thanks for the assistance!

  8. Ivo
    Admin
    Ivo avatar
    29 posts

    Posted 08 Aug 2019 Link to this post

    Hello Peter,

    I am glad to hear that the issue you were facing is now resolved. Wish you a great day.

    Regards,
    Ivo
    Progress 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
  9. Arthur
    Arthur avatar
    4 posts
    Member since:
    Jun 2011

    Posted 16 Aug 2019 Link to this post

    I'm running into a similar situation trying to get this profiler working however I do NOT have the ability to open visual studio and click on things?  I'm currently running this on a headless build slave, where I have the build agent running as "nt authority\system."

    This slave also had some churn on it in terms of having to reinstall visual studio 2015 enterprise, is there some other step I need to account for to restore things?

    As an FYI I have a diagnostic script to see if the various environment variables are set for the profiler:

    write-host "COR_ENABLE_PROFILING: $($env:COR_ENABLE_PROFILING)"
    write-host "JUSTMOCK_INSTANCE: $($env:JUSTMOCK_INSTANCE)"
    write-host "COR_PROFILER: $($env:COR_PROFILER)"
    whoami
    When I run this on my build slave it presents me with:

    COR_ENABLE_PROFILING: 1

    JUSTMOCK_INSTANCE: 1

    COR_PROFILER: {B7ABE522-A68F-44F2-925B-81E7488E9EC0}

    nt authority\system

  10. Mihail
    Admin
    Mihail avatar
    264 posts

    Posted 20 Aug 2019 Link to this post

    Hello Arthur,

    I have noticed that you have opened another thread about your issue. I will answer you there.

    Regards,
    Mihail
    Progress 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
Back to Top