none
Test Agent error RRS feed

  • Question

  • Hi Team

        I have a query about an issue with test agents in our setup. We have multiple test machines and each of them have a Test Agent configured on them. Each of these test machines register to a common test controller. Test Settings file which the mahine uses during test run has a Agent property in it which is set to same value as Agent attribute for the Agent in Manage Test Controllers box in Visual Studio 2012. Lately we are observing that when the tests start to execute, TFS build breaks with the following error coming up in the build. In Manage Test Controllers, we found that the agent attribute for the particular agent keeps getting removed by Visual Studio. Once we re-add the Agent attribute there, tests run fine. Pls provide your inputs on what might be causing this issue.

    Error coming during the build:
    Failed to queue test run 'XXX@XXX 2014-10-27 22:35:50_Any CPU_Release': There is no agent available for the role that must run the tests. Your tests cannot be run. You can perform one of the following actions and then run your tests:
     C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets (1385): 
     C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets (1385): - You can wait for an agent to become available for this role to run the tests.
     C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets (1385): - If there are any agents that are offline that can be used for this role, you must change the state of the agent to online. In addition, you might have to restart the agent if it has been disconnected from the controller.
     C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets (1385): - You can add another agent with the correct agent properties for the role to the test controller.
     C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets (1385): - You can change the agent properties for the role in the test settings to enable other agents that you want to use.

    Thanks

    Sandeep
    Tuesday, October 28, 2014 1:58 PM

Answers

  • Hi Sandeep,

    The issue only occurred with the Agent attribute in Manage Test Controller dialog, and the Agent property in test settings file always exists, right? If yes, please run the test from Visual Studio using test controller and test agent remotely instead of from TFS build to check whether the agent property in Manage Test Controller will be removed again. It will help to check whether the issue is related to TFS.

    Note that when you use test settings for VS2010 unit test/coded UI test, please make sure you apply the test settings to the test solution through Test->Test Settings->Select Settings file.

    Actually I doubt something affected VS, please reboot your VS machine, close VS, run VS as admin, reset your VS settings through Tools->Import and Export settings->Reset all settings->…. , run devenv/resetuserdata commands from Run prompt and then run tests from VS or TFS build.

     If possible, please try to run VS under safe mode using devenv.exe /safemode(http://msdn.microsoft.com/en-us/library/ms241278(v=vs.110).aspx ) to avoid the impact from some third-party VSPackages and then run tests.

    Note that devenv.exe can be located under your VS location/Common7/IDE

    What your need is to put it to run prompt and add commands to it.

    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.

    Wednesday, October 29, 2014 6:31 AM
    Moderator

All replies

  • Hi Sandeep,

    The issue only occurred with the Agent attribute in Manage Test Controller dialog, and the Agent property in test settings file always exists, right? If yes, please run the test from Visual Studio using test controller and test agent remotely instead of from TFS build to check whether the agent property in Manage Test Controller will be removed again. It will help to check whether the issue is related to TFS.

    Note that when you use test settings for VS2010 unit test/coded UI test, please make sure you apply the test settings to the test solution through Test->Test Settings->Select Settings file.

    Actually I doubt something affected VS, please reboot your VS machine, close VS, run VS as admin, reset your VS settings through Tools->Import and Export settings->Reset all settings->…. , run devenv/resetuserdata commands from Run prompt and then run tests from VS or TFS build.

     If possible, please try to run VS under safe mode using devenv.exe /safemode(http://msdn.microsoft.com/en-us/library/ms241278(v=vs.110).aspx ) to avoid the impact from some third-party VSPackages and then run tests.

    Note that devenv.exe can be located under your VS location/Common7/IDE

    What your need is to put it to run prompt and add commands to it.

    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.

    Wednesday, October 29, 2014 6:31 AM
    Moderator
  • Hi Sandeep,

    What about your issue now?

    If my suggestions did not help you to resolve this issue, you can tell us the result of my suggestions so that we can further look at this issue. We will try our best to help you.

    Thanks,


    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.

    Friday, October 31, 2014 1:34 AM
    Moderator