Set up environments to run continuous test tasks with your build tasks

VSTS | TFS 2017 | TFS 2015

To test your app using different platforms and configurations, set up separate environments to run your app and tests with your builds in Visual Studio Team Services (VSTS) or Team Foundation Server (TFS).

Set up machines to run your app and tests

You'll need to set up physical or virtual machines to run your app and tests, for example:

  • Windows Server 2012 R2 with IIS to run your app

  • Machines with the necessary browsers to run your tests

With VSTS, you can define environments that have physical and virtual machines, such as Azure VMs and Azure resource groups. With TFS, you can define environments using only physical machines.

If you want to use a PowerShell script to deploy your app, make sure to:

  • Include that script in your solution or project.

  • Enable PowerShell Remote on all your machines.

You'll need to install the agent that runs your tests on the machines. For more details, see Deploy a Windows build agent. You might decide to create Azure VMs to install your agents.

Define a list of machines to run your app and tests

Previous versions of VSTS and TFS included the capability to define Machine Groups. However, this feature has been deprecated and it is no longer possible to use it to create machine groups.

As an alternative, you can use:

  • A comma-delimited list of machine IP addresses or fully-qualified domain names (FQDNs), together with any port information, in all your build or release definitions. For example:,,

  • A variable that contains the list of machines. For example, a build or release definition variable or a variable defined within a project-wide variable group. For example, you could define the variable named MyMachines with the value shown above, then include it in your tasks using:


    Using a variable means that you can change the list of machines in one place and have the change apply to all the tasks that use the variable.

If you don't specify a port number, the default (based on the selected protocol) will be used. If you are using HTTPS, the IP address or name of the machine should match the CN entry in the certificate. Note that you can set the Test Certificate option in some build, test, and deploy tasks to omit certificate checks.

You will typically use a list of machine names in the following tasks:


See also

Help and support

Report any problems on Developer Community, make suggestions on UserVoice, get advice on Stack Overflow, and get support via our Support page.