Dela via


Getting Started with Team System Testing Tools

This section takes you on a tour through the tools and windows of Microsoft Visual Studio Team System Test Edition. 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.

Note

Not all of the functionality described here is available in Visual Studio Professional Edition. In this walkthrough, you cannot perform the following steps if you are using Visual Studio Professional Edition: Create a manual test; publish test results; use the Test List Editor; create, run, and re-use test lists. For complete information about the testing capabilities that Professional Edition offers, see Using Testing Tools in Visual Studio Professional Edition.

Not 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.

  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 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. By clicking Show Code Coverage Results on the Test Results window toolbar, 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 List Editor.

    This displays the Test List Editor. If you are a tester, you will probably use the Test List Editor 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 List Editor 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 /?

    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 List Editor, 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 List Editor, 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 Test Edition.

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:

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 Test Edition

How to: Set Time Limits for Running Tests

Concepts

Selecting a Test Type

Dialog Boxes of Test Edition

How Do I in Test Edition

Other Resources

Viewing and Running Tests

Walkthroughs for Test Edition

Testing Tools Tasks

Test Types