Search code examples
controllerautomated-teststfsbuildbuild-automationcoded-ui-tests

Running coded ui build auto tests gets: Failed to queue test run to the controller that collects data and diagnostics


I'm running a build from TFS build agent cloud machine (BuildAgent01) that should run a Coded UI unit tests using a testsettings file which is configured to a test controller. Both my test controller and the test agent are installed on another cloud machine (Automation). Both machines are in workgroup. Agent is configured to interactive process. When I configure my testsettings file as "Local execution with remote collection" I can run my test with the controller. When I'm running the build I get this message:

Test run 'Administrator@BUILDAGENT01 2017-03-21 09:59:46' could not be executed. Failed to queue test run to the controller that collects data and diagnostics: Automation. No such host is known

I guess the Administrator@BUILDAGENT01 is not recognized in the Automation machine but I'm not sure what I should do.

TFS, test controller and agent are 2017, Visual Studio is 2015.

I can telnet between both machines and the firewalls are down for now.

These are my controller and agent settings: enter image description here

this is my testsettings file:

 <?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="TestSettingDistributedTestWalkthrough" id="112ff656-58fb-4450-8456-5764f3ef2b14" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
  <Description>Distributed test settings.</Description>
  <Deployment>
    <DeploymentItem filename="C:\Work\3rd Party\Oracle.ManagedDataAccess.dll" />
  </Deployment>
  <RemoteController name="Automation" />
  <Execution>
    <TestTypeSpecific>
      <UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
        <AssemblyResolution>
          <TestDirectory useLoadContext="true" />
        </AssemblyResolution>
      </UnitTestRunConfig>
      <WebTestRunConfiguration testTypeId="4e7599fa-5ecb-43e9-a887-cd63cf72d207">
        <Browser name="Internet Explorer 10.0" MaxConnections="6">
          <Headers>
            <Header name="User-Agent" value="Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)" />
            <Header name="Accept" value="*/*" />
            <Header name="Accept-Language" value="{{$IEAcceptLanguage}}" />
            <Header name="Accept-Encoding" value="GZIP" />
          </Headers>
        </Browser>
      </WebTestRunConfiguration>
    </TestTypeSpecific>
    <AgentRule name="LocalMachineDefaultRole">
    </AgentRule>
  </Execution>
  <Properties />
  <CollectionOnlyAgents>
    <AgentRules>
      <AgentRule name="Distributed test">
      </AgentRule>
    </AgentRules>
  </CollectionOnlyAgents>
</TestSettings>

Solution

  • The different scenarios related to running automated tests in various workflows and which versions can / cannot be used.

    Agents for Visual Studio 2013 Update 5

    • Can be used for TC/TA scenarios
    • Cannot be used for Team Build/Release Management scenarios
    • Can run tests that were built using Visual Studio 2013 and Visual Studio 2015.

    Agents for Visual Studio 2015 and Agents for Visual Studio 2015 Update 3

    • Cannot be used for TC/TA scenarios

    • Can be used for Team Build / Release Management scenarios

    • Can run tests that were built using Visual Studio 2015 and Visual Studio 2013.

    Agents for Visual Studio 2017

    • Can be used for TC/TA scenarios

    • Can be used for Team Build / Release Management scenarios.

    • Can run tests that were built using Visual Studio 2017.

    For more info please refer: Test Controller, Test Agent versions and their usage in different scenarios. Since your test are built with VS2015, give a try with Agents for Visual Studio 2013 Update 5, which may do the trick.


    Moreover, XAML Build are deprecated in TFS 2017 and will not be available in tge next version of TFS. VSTS already no longer supports them.

    I'm looking for the hosted XAML build controller. Where did it go?

    The hosted XAML build controller is no longer supported. Accounts created on or after April 2016 do not have access to it. We plan to remove the hosted XAML build controller from all accounts, possibly as soon as March 2017.

    Source

    Since you are already using TFS2017. Highly recommend you to convert your builds to vNext Build to access some new technology and support. For more please refer Why Should I Leave XAML Builds?