Share via


High-Level Test Platform Extensibility Areas

If you are a developer who needs only basic test-tool integration, you need to work with only a small set of core extensibility areas to create a simple test type that runs in the test environment.

By implementing a small number of classes, you can satisfy the basic integration requirements for a new test type. The new test type can then be used in conjunction with all the features for managing tests, including the Test Manager, Test View, and Test Results windows.

By implementing additional classes and a VSIP package, you can add other features such as a custom test editor, integration with the run configuration dialog box, and a custom results viewer for your new test type.

These are the ways in which you can integrate a new test type into the Visual Studio test environment:

  • Basic Test Management Windows. For tests that produce simple results, basic integration lets test users view, manage, and run tests.

  • Custom Editing Window and Results Viewer. For more advanced test types, you can display custom UI components for authoring tests and viewing their results.

  • Creating Tests that Run Under Load. You can also create tests that will run under a load test.

  • Adding Custom Run Configuration Settings. Your new test types can access the built-in run-configuration settings, and you can add custom run-configuration settings.

  • Custom Shortcut Menu Options. You can make special commands available for your new test type by adding them to shortcut menus.

To learn how to integrate your test type into the Visual Studio test environment, see Implementing Custom Test Types.

Basic Test Management Windows

After the test type has been integrated, test users can create instances of the new test type by using the Add New Item dialog box, and edit the test’s properties by using the Properties window. They can also view, manage, and run tests of this type using the Test Manager, Test View, and Test Runs windows, and view the results in the Test Results window. This basic level of integration is sufficient when you expect the creation of the test to be straightforward and its test results to be simple.

The following illustration shows the principal windows used for managing tests, running tests, and viewing tests and test results.

Figure 1: Elements of Basic Test Management UI

Elements of Basic Test Management UI

Custom Editing Window and Results Viewer

You can also create a more advanced test type with a custom editor for editing test properties and a custom results viewer for viewing custom results data. To do this, you have to implement a few more interfaces and classes to display custom UI components in the test environment. This level of integration corresponds to more complex test types that require a more sophisticated interface for authoring the tests, a more meaningful interface for viewing results data, or both. Such a results interface could, for example, display graphs, instead of just reporting a “passed” or “failed” result.

The following illustration shows a custom editor pane used to create a custom test type.

Figure 2: Example of a Custom Test Editor

Example of a Custom Test Editor

The following illustration shows an additional custom tool that augments the custom test editor. This custom authoring wizard helps you create useful new instances of a test type.

Figure 3: Example of Custom Authoring Wizard

Example of a Custom Authoring Wizard

When your test returns results that are complex, you might need a more powerful way to display the results in order to make analysis easier. The following illustration shows an example of a custom results viewer: a real-time chart generator.

Figure 4: Example of a custom results viewer

Example of a Custom Results Viewer

Creating Tests that Run Under Load

You can also create tests that will run under a load test. Test types that drive servers under test at the protocol level, and therefore scale well, are among the most informative to run under load. Examples are a test that drives a mail server over SMTP and a network-level test that records and plays back network traffic. It is fairly simple to add support for the required interfaces. For more information, see How to: Add Support for Load Tests.

Adding Custom Run Configuration Settings

Before test users run tests, they can configure settings that control how tests will run, for example, whether to run them locally on or a remote computer. New test types that are created by using the Test Type Extensibility Framework can access this standard run-configuration data. Integrators of new test types can also add new run-configuration settings that test users can modify to define how custom test types will be run.

The following illustration shows the dialog box used to specify run configuration settings.

Figure 5: Example of the Test Run Configuration Dialog Box

Example of the Test Run Configuration Dialog Box

To integrate a new test type with the Run Configuration dialog box, developers have to implement only a few more classes to describe their test-type data and new run configuration editor UI. This is especially appropriate when developers want to be able to define run configuration settings that affect running instances of their test types at the global level.

Custom Shortcut Menu Options

Finally, the Test Type Extensibility Framework lets developers create custom shortcut menu options for their test types. Shortcut menus appear when you right-click specific UI contexts, specifically the Test Manager, Test View, and Test Results windows. To enable this functionality, developers have to implement only one additional interface and add the appropriate VSIP resources.

You use this type of extensibility when you want special commands to be available for your test type. To see an example of a shortcut menu option, right-click the row for a test result in the Test Results window. The shortcut menu that appears offers the option Open Test, which displays the section of source code that caused the test to fail.

Figure 6: Example of a custom option in a shortcut menu

Example of a Custom Option in a Shortcut Menu

Next Steps

The steps that you take to integrate custom test types into the test environment of Visual Studio Application Lifecyle Management are described in Implementing Custom Test Types.

See Also

Concepts

Packaging and Installing Test Type Extensions in Visual Studio

Other Resources

Implementing Custom Test Types

Creating Custom Test Types in Visual Studio