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 using Visual Studio Ultimate or Visual Studio Test Professional. The guide contains a checklist of the essential tasks that you must perform before you can run your automated tests using Microsoft Test Manager.
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.
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.
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. Install test agents on the computers that you want to use as part of your physical environment for testing. These computers can be physical or virtual machines.
Create a physical environment that uses this test controller and the machines with test agents.
Create a test plan and test suites using Microsoft Test Manager.
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 physical environment. Add the test settings and environment to your test plan.
Create automated tests using Microsoft Visual Studio 2010. 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:
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.
This topic also includes sections about how to assign a build to your plan and creating test settings and environments.
These tasks cover using a physical environment to run your automated tests. If you want to use a virtual environment, you need Visual Studio Lab Management. For more information about how to create a virtual lab using Visual Studio Lab Management, see Using a Virtual Lab for Your Application Lifecycle.