none
Unable to get TestAdaperPath in VsTests Task in Release Management RRS feed

  • Question

  • while running tests in VSTests task in release management I am getting below error 

    The path '%SystemDrive%\Temp\foo' specified in the 'TestAdapterPath' is invalid. Error: The custom test adapter search path provided was not found, provide a valid path and try again.

    Below is my RUnConfiguration setting 

     <RunConfiguration>
        <ResultsDirectory>.\TestResults</ResultsDirectory>
        <TargetPlatform>x86</TargetPlatform>
        <!-- Framework35 | [Framework40] | Framework45 -->
        <TargetFrameworkVersion>Framework45</TargetFrameworkVersion>
        <!-- Path to Test Adapters -->
        <TestAdaptersPaths>%SystemDrive%\Temp\foo;%SystemDrive%\Temp\bar</TestAdaptersPaths>
      </RunConfiguration>

    Wednesday, January 23, 2019 3:07 PM

All replies

  • Hi GP_PUN,

    Do you run your test using the command line locally or the Azure DevOps/TFS?

    If you run it using the Azure DevOps, can you run it successfully in your host agent machine locally?

    >>The path '%SystemDrive%\Temp\foo' specified in the 'TestAdapterPath' is invalid. Error: The custom test adapter search path provided was not found, provide a valid path and try again.

    It seems that the error means that it couldn't find the test adapter path in your host agent, did you view the following document which shared the steps about how to run test with runsettings locally?

    https://docs.microsoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2017#example-runsettings-file

    If so, the above link shared how to run test with runsettings locally with VS IDE or command line. As my understanding, it was different from the running way in Azure DevOps.

    >><TestAdaptersPaths>%SystemDrive%\Temp\foo;%SystemDrive%\Temp\bar</TestAdaptersPaths>

    For the TestAdapterpaths property, it would be related to the path, please set the absolute path in your host agent, view the result again.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, January 24, 2019 9:07 AM
    Moderator
  • Thanks Jack,

    I am using Azur DevOps VMs only, I used the same settings file but no luck. even I specified absolute path in <TestAdapterPath>D:\.......\bin\Debug</TestAdapterPath> but still VsTest task fails with the same error message bit strange. 

    Ok what I am doing here is 

    1- I have some automated Tests using MSTest Framework

    2- I am using runsetting file for execution but I have runsetting file resided in Project Directory not in Solution directory.

    Do we need it at solution directory?

    Do we need Solution as well in Release location instead just Debug folder for referring Setting files?

    I tried even keeping runsettings in Solution direcctory but No luck. :(.

    Thank you

    GP


    • Edited by GP_PUN Friday, January 25, 2019 12:21 PM updated Response against the quesitons I did ask
    Friday, January 25, 2019 5:39 AM
  • Hi GP,

    Is it the TestAdaptersPaths or TestAdapterPaths?

    Can you run it in command line with VSTest in your host agent with the VS IDE?

    In default, the runsettings file was in the Solution folder with the sln file. Please test it in debug mode.

    Please also make sure that it was not the path issue of the test adapter like Eddie's suggestion:

    https://stackoverflow.com/questions/38983063/visual-studio-test-agent-deployment-with-nunit3-and-google-test

    Best Regards,

    Jack



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, January 25, 2019 10:14 AM
    Moderator