Steps:
- You will need to NAT a public IP address to the private IP address of your Visual Studio Test Controller system, or place it in a DMZ and assign it a public IP address. I recommend the first option.
- You will need to put in firewall rules to allow the following ports from the public IP address of your Visual Studio Test Agent VMs to your Visual Studio Test Controller system.
- 137/udp, 138/udp, 139/tcp, 445/tcp, 6901/TCP, ICMP echo request.
- Create a domain user named "VsTestService" in the domain where the test controller resides.
- Add this user ( <domain>\VsTestService ) to the "administrators" group on your Visual Studio Test Controller system.
- Add this user ( <domain>\VsTestService ) to the "TeamTestAgentService" group on the Visual Studio Test Controller system.
- Create a local account on the Visual Studio Test Controller system named "VsTestService" with the exact same password as the domain "VsTestService" account that you created in step 3.
- Add this user ( <ComputerName>\VsTestService ) to the "admininstrators" group on the Visual Studio Test Controller system.
- Add this user ( <ComputerName>\VsTestService ) to the "TeamTestAgentService" group on the Visual Studio Test Controller system.
- Add this user ( <ComputerName>\VsTestService ) to the "TeamTestControllerAdmins" group on the Visual Studio Test Controller system.
- Add the netbios hostname of the Visual Studio Test Agent system to the hosts file on the Visual Studio Test Controller system with the public IP address Visual Studio Test Agent system (or add it to your internal DNS). You can get this by running "echo %computername%" at a command prompt.
- Keep in mind that the public IP address of these VMs in the cloud often change if you shut off the VM and later power it back on. In this case, you will need to update the hosts file (or internal DNS) each time the IP address changes.
- Install the Visual Studio Test Controller on the Visual Studio Test Controller system.
- When configuring it, set the service to run under the domain service account you created ( <domain>\VsTestService ). If you run it under the local account, the test manager will likely fail to authenticate to the test controller.
- You will need to put in firewall rules to allow the following port 6910/tcp from the public IP address of your Visual Studio Test Controller system to your Visual Studio Test Agent system.
- Create a local account on the Visual Studio Test Agent system named "VsTestService" with the exact same password that you used when you created the "VsTestService" accounts in steps 3 and 4.
- Add this user ( <ComputerName>\VsTestService ) to the "admininstrators" group on the Visual Studio Test Agent system.
- Add the netbios hostname and FQDN (active directory domain, not internet domain) of the Visual Studio Test Controller system to the hosts file of the Visual Studio Test Agent system with the public IP address of the Visual Studio Test Controller system (see the example below).#Example111.222.333.444 ControllerName111.222.333.444 ControllerName.ADDomain.local
- Log off of the Visual Studio Test Agent system and log back on with the local "VsTestService" account you created ( <ComputerName>\VsTestService ).
- Install the Visual Studio Test Agent on the Visual Studio Test Agent system.
- When configuring it, set the service to run under the local "VsTestService" account you created ( <ComputerName>\VsTestService ).
Note* If you have any hosts file entries with the IP address 127.0.0.1, it will probably still fail. For more information on this quirk, see this article.