locked
Microsoft Fakes tests failing in VS2013 RRS feed

  • Question

  • Hello,

    Last week I've developed some Fakes based tests in VS2012, they were all passing when I checked in. After deploying VS2013 to the machine all Fakes tests started failing with the following message:

    Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: UnitTestIsolation instrumentation failed to initialize. Please restart Visual Studio and rerun this test

    Trying to run them in VS2012 yields the same result.

    Furthermore, the Event Viewer shows: 'Cannot find Profiler path running process. Operation cannot continue.'

    Thanks,

    Marius O.

    Friday, December 13, 2013 9:14 AM

Answers

  • Hi Marius,

    Thank you for your help so far, but it seems I need to figure this out on my own.

    I agree with you, I’m afraid that you need to get more information in your side.

    1. To make sure that whether it is related to your VS setup, maybe you could create a new fakes test in your VS2013, and then run it, if it works well, I’m afraid that it is not the VS setup issue.
    2. You could run your VS in safe mode, or you could run your VS as the admin, check it again.
    3. If all fakes tests have the same issue in your VS2013, to make sure that whether it is related to your VS setup, I suggest you re-install your VS2013.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, December 19, 2013 2:28 AM

All replies

  • Hi Marius,

    Did you use the TFS-build to run your test? Could you run it in your test Explorer window in VS2012/VS2013? As far as I know, the fakes tests have some limitation in command line, so you would make sure that you select “Visual Studio Test Runner”(not the MSTest) in TFS-build. If you mean that it has this issue when you run it in VS IDE without the TFS, maybe you could create a new similar project, and then find the differences.

    Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: UnitTestIsolation instrumentation failed to initialize. Please restart Visual Studio and rerun this test

    Reference:

    http://connect.microsoft.com/VisualStudio/feedback/details/785411/cannot-debug-unit-tests-with-shims-in-vs2012-w-update2

    http://stackoverflow.com/questions/19274591/exception-running-unit-tests-with-fakes-on-build-server

    http://stackoverflow.com/questions/16664814/unittestisolationexception-throws-exception-while-running-shims-test-in-release

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 16, 2013 7:04 AM
  • Hi Jack and thanks for the quick reply,

    I'm running the tests in VS (it's got nothing to do with TFS, my statement about checking the code in was misleading indeed). I've also tried the command-line via VSTest and the results are the same. In the IDE I've tried both the default test runner and Resharper with simial results.

    Weirdly enough the tests run on my team mates machines even after updating to VS2013, so it's something related to my machine, but I haven't got enough information to understand what that is. I'll try and Repair the deployment and maybe it will work.

    The links don't apply to my situation.

    Monday, December 16, 2013 10:18 AM
  • Hi Marius,

    Thanks for your response.

    If it worked well in other machines, I’m afraid that it would be related to your Environment.

    Requirements:          

    Visual Studio Ultimate or Premium

    Maybe you could check whether you install the same VS version as other Environment.

    If it is not the VS versions issue, I doubt that it would be the VS setup issue.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 16, 2013 11:06 AM
  • Hi again,

    I'm already using VS Premium, all our dev machines are fairly similar (in terms of VS, plugins etc), but of course developers are allowed to install extras if they feel like it.

    It seems something failed on my machine when deploying VS2013, I'll try and track the installation log files.

    Thank you for your help so far, but it seems I need to figure this out on my own.

    Thanks,

    Marius O.

    Wednesday, December 18, 2013 9:45 AM
  • Hi Marius,

    Thank you for your help so far, but it seems I need to figure this out on my own.

    I agree with you, I’m afraid that you need to get more information in your side.

    1. To make sure that whether it is related to your VS setup, maybe you could create a new fakes test in your VS2013, and then run it, if it works well, I’m afraid that it is not the VS setup issue.
    2. You could run your VS in safe mode, or you could run your VS as the admin, check it again.
    3. If all fakes tests have the same issue in your VS2013, to make sure that whether it is related to your VS setup, I suggest you re-install your VS2013.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, December 19, 2013 2:28 AM
  • Hi All,

    I am working on creating Test Cases for Sharepoint.

    Can you help me with creating Test cases in Sharepoint using Fakes framework. I am using VS2013 for creating test cases. Can anybody provide any link or suggestion for this.

    Thanks in advance.


    Himanshu Nigam

    Monday, December 29, 2014 10:55 AM
  • Hi Himanshu,

    Since this case has been closed for a long time, if you met any test issues, please post a new thread in this forum, we will follow up your new issue.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 30, 2014 1:46 AM