Essential Guide for Running Automated Tests from a Test Plan

This is a guide for how to run automated tests as part of your test plan. The guide contains a checklist of the essential tasks that you must perform before you can run your automated tests using Microsoft Test Manager.


  • Visual Studio Ultimate, Visual Studio Premium, Visual Studio Test Professional

The following illustration shows how automated tests might be run for a multi-tier application using a test controller and test agents. For a test plan, you have to use an environment with your test controller to run automated tests. An environment is the set of roles that are required to run a specific application and the machines to be used for each role. The set of roles used in the following illustration are Web Server, Database Server and Client.

Test Controller and Test Agents

When the tests are run as part of a test plan, you select test settings and environments for your test plan as shown in the following illustration. You configure a test plan using the Properties view in the Plan section of the Testing Center.

Test Settings Concepts

Checklist for Tasks


Task Description




Determine what roles you need in your environment to run automated tests to test the application. For example, it could be a Web server and a desktop client that runs a browser. Then install a test controller and register it with your Team Foundation Server. These computers can be physical or virtual machines.


Create a lab environment that uses this test controller and the machines with test agents.


Create a test plan and test suites using Microsoft Test Manager.

> [!NOTE] >

You can also create test cases in your test suites with which you can associate each automated test. Or you can create test cases from your assembly of automated tests. See step 9 for details about creating test cases.


Create automated test settings for your test plan with a set of roles that match your lab environment. Add the test settings and environment to your test plan.


Create automated tests using Visual Studio. These tests might be unit tests or coded UI tests.


Check in the test project for your automated tests to version control for Team Foundation Server.


Add this test project to an existing build definition or create a build definition for this test project by using Team Foundation Build.


Queue a build using this build definition


Associate your automated tests with test cases in your test plan by either of the following methods:

  • Create test cases in your test plan and manually associate a test method with each test case

  • Create test cases from an assembly of automated tests

> [!NOTE] >

These topics also contain the information for the following steps.


Assign the build to your test plan.


Run your automated tests. You can view and analyze the automated tests when your test run completes.

You can run with the build, test settings and environment assigned to the plan or you can select different settings and environments if it is required.

> [!NOTE] >

This topic also includes sections about how to assign a build to your plan and creating test settings and environments.


For more information about how to create a lab environment using Visual Studio Lab Management, see Using a Lab Environment for Your Application Lifecycle.

See Also


Running Automated Tests

Testing the Application