Getting Started with Team System Testing Tools

This section takes you on a tour through the tools and windows of Microsoft Visual Studio 2005 Team Edition for Software Testers. You will see basic aspects of the Team System testing tools, such as how to create and work with tests, the types of tests that are available, and how to configure the testing tools.

Prerequisites

To take full advantage of this tour, start Visual Studio by choosing the tester profile settings. When you start Visual Studio 2005 for the first time, you will see the Choose Default Environment Settings dialog box. Click Team Test Settings and then click Start Visual Studio.

Note

If you do not see this dialog box when you start Visual Studio, open the Visual Studio 2005 command prompt, type devenv /resetuserdata, and then press Enter. Then, start Visual Studio again.

This does not mean that only testers can benefit from the Team System testing tools. Programmers, especially those who create tests, will use many of the features of the Team System testing tools. Both roles are described here:

  • Tester. After you start Visual Studio with the tester profile, certain menus and windows that are specific to programming are removed, which lets you focus on the tasks of creating non-programmatic tests, managing existing tests, and running tests. For more information, see Creating and Editing Tests, Managing Tests, and Running Tests.

  • Programmer. When you start Visual Studio, you can select whichever language you think you will be most likely to use, or to learn, as you program production code or code used for testing purposes. Choosing a language on the Choose Default Environment Settings dialog box identifies you as a programmer. No menus and windows are hidden when you make this choice. For more information, see Creating and Editing Tests and Running Tests.

What Features Will You Use?

Here is a quick overview of features that are specific to the Team System testing tools.

A tour through the features of Team Edition for Testers

  1. Start Visual Studio with the tester profile.

  2. Click the Test menu.

    Through this menu, you can create new tests, make settings for your test environment, configure remote test runs, and open the windows of the Team System testing tools. Several default test types are offered; for more information, see Selecting a Test Type.

  3. Create a Web test. To learn how, see How to: Record a Web Test or Walkthrough: Recording and Running a Web Test.

    As you created the new test, a solution was created and a test project was automatically added to the solution. A test project can contain any number of tests of any type. Test projects exist alongside the other projects of your solution. They are built into assemblies just like other kinds of projects.

  4. In Solution Explorer, double-click the file with the extension .testrunconfig.

    This displays the run configuration dialog box. By editing your run configuration, you can change many aspects of the way your tests run. You can store multiple sets of run configuration settings, but only one set is active. Your tests are run according to whichever run configuration is currently active. For more information, see Configuring Test Execution.

  5. Click Test, click Windows, and then click Test View.

    The Test View window is available in Team Edition for Testers and also in Team Edition for Developers. This window displays all the tests that are currently loaded. You use it during the process of test development. For more information, see Viewing and Running Tests.

  6. Now, run your Web test. See How to: Run a Web Test.

    Running a test opens the Test Results window. This window displays a summary of test results, in tabular form. It displays one test run at a time; within the test run, each row represents the result of one individual test.

    You can double-click a row in the Test Results window to obtain more detail about the results of that test. Through the Test Results window, you can also see data on the extent to which your code was covered when tests were run against it. For more information, see How to: Obtain Code Coverage Data.

    Note

    If your are connected to Team Foundation Server, you can also publish your test results data, create work items from tests or test results, and associate tests or test results with existing work items; see Integration with Team System.

  7. Click Test, and then click Windows, and then click Test Manager.

    This displays the Test Manager window. If you are a tester, you will probably use the Test Manager window frequently. You can use it to organize tests into lists, to run tests, to filter and group the display of the tests you have loaded, to import additional tests into your currently loaded set, and to export tests. If you have no tests currently loaded, you can use the Test Manager window to load tests from folders on the hard drive. For more information, see Managing Tests.

  8. Open a Visual Studio 2005 command prompt and type mstest /h.

    This is the MSTest.exe command line test utility. You will probably use this command if you are running tests in a test or build lab. This command lets you run tests and obtain results, and to publish your test result data so that the rest of your team can use it. For more information, see Command-Line Test Execution.

  9. Create a manual test. For more information, see How to: Create a Manual Test.

  10. In the Test Manager window, right-click Lists of Tests, and then click New Test List.

  11. Type a name of your choosing and then click OK.

    You have created a test list. Test lists are containers into which you organize tests.

  12. In the Test Manager window, click All Loaded Tests.

  13. Drag your Web test and your manual test into the test list that you just created.

    You have just populated the new test list with your two tests.

  14. Click the box next to your test list and click the Run Checked tests button.

    This runs all the tests in the test list. One of those tests is a manual test. When you run a manual test, Visual Studio displays a dialog box to alert you of that fact. This is an example of one of several cases in which a dialog box asks you how to proceed or alerts you to a certain situation. As with most facets of Visual Studio, you can customize the behavior of dialog boxes such as this by making settings on a page reached through the Options option of the Tools menu. For more information, see Dialog Boxes of Team Edition for Testers.

Integration with Team System

If your Visual Studio session is connected to a Team Foundation Server, you can use the team-related aspects of Team System testing tools, such as the following:

  • You can publish test results to the Team Foundation Server. For more information, see Publishing Test Results. After test results are published, they can be viewed and analyzed by the rest of your team.

  • After you have created a test list, you can reuse it when a person working in the build lab using Team Foundation Build creates a build type, such as for the process of running build verification tests. For more information, see How to: Create a New Build Type and How to: Configure and Run Build Verification Tests (BVTs).

  • A test list can be associated with a check-in policy. For more information, see Working with Check-in Policies and Notes. This means that a project manager can specify that, before particular code is checked in, it must be tested using a specific set of tests.

See Also

Tasks

How to: Create a Test Project
How to: Configure Test Project Creation
How to: Open a Test to Edit
How to: Configure the Dialog Boxes of Team Edition for Testers
How to: Set Time Limits for Running Tests

Concepts

Selecting a Test Type
Dialog Boxes of Team Edition for Testers
How Do I in Team Edition for Testers

Other Resources

Viewing and Running Tests
Walkthroughs for Team Edition for Testers
Testing Tools Tasks
Test Types