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.

Requirements

  • 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

Step

Task Description

Topic

Done?

1

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.

2

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

3

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.

4

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.

5

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

6

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

7

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

8

Queue a build using this build definition

9

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.

10

Assign the build to your test plan.

11

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.

Note

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

Concepts

Running Automated Tests

Testing the Application