Mstest :Unable to execute tests via Mstest in my laptop RRS feed

  • Question

  • Hi all,

    I am trying to execute a testdll in MStest on my laptop which has got VS2012 and VS2010 installed.

    It was working fine till last week. Don't know what happened all of sudden, Mstest is not working now.

    When i try to execute a dll , I get the following error in command prompt.

    "Failed to queue test run 'loginid@Hostname 2014-05-12 09:29:13_x64_retail': Access to the path 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\TestResults\LoginId_hostname 2014-05-12 09_29_13_x64_retail' is denied.
    Error when trying to save result file: Access to the path 'C:\Program Files (x86)\Microsoft Visual S
    tudio 11.0\VC\TestResults\LoginId_hostname 2014-05-12 09_29_13_x64_retail.trx' is denied.
    Results file does not exist. Publish failed."

    Can anyone let me know why this Access denied error is coming and how to correct it.

    Monday, May 12, 2014 5:33 AM


  • Hi,

    By default, when you run tests, a folder named TestResults under the solution directory is created if the TestResults folder does not exist, the deployment files and test results will be stored there.

    Whether the test dll/test solution is under C:\Program Files (x86)\Microsoft Visual S
    tudio 11.0\VC path? If yes, please make sure that 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\TestResults’ folder exists on your side and you have enough permissions such as Write permission on that path/folder.

    If no help, please create a new test project from Visual Studio and then run the test, will you get the issue again?

    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.

    • Proposed as answer by Amanda Zhu Thursday, May 15, 2014 9:31 AM
    • Marked as answer by Amanda Zhu Monday, May 19, 2014 1:39 AM
    Tuesday, May 13, 2014 5:52 AM