This documentation is archived and is not being maintained.

How to: Specify Tests to Run in a Host Adapter

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Testers can specify tests to run in a host in either of two ways:

Use the HostType attribute to choose individual tests to run on a particular host. Use the test run configuration editor to run all of the tests in a test run in a certain way, such as on a particular host. For more information about using the test run configuration editor, see Configuring Test Execution.

The host specified in the HostType attribute might differ from the host specified in the current test run configuration. In this case, the following rules are followed:

  • If the test run configuration indicates to use the default test host and a HostType is specified, the host indicated by the HostType is used.

  • If the test run configuration indicates a test host other than the default test host, that host is used regardless of any HostType specification. This lets testers and developers specify the test host to use even if they cannot recompile the test assembly.

Use the HostType Attribute

To configure a test to run on a specific host by using the HostType attribute

Use the Run Configuration Editor

To run tests on a specific host by using the run configuration editor

  1. Under the Solution Items folder in Solution Explorer, double-click the test run configuration file that you want to open.

    - or -

    Point to Edit Test Run Configurations on the Test menu and then click a run configuration on the submenu.

    The run configuration opens for editing.

  2. Click Hosts.

    Under Host type, the names of all built-in and custom hosts are displayed.

  3. Select the host to use for your tests.

  4. If additional options are displayed on the Hosts page for this host, set them as your test runs require.

  5. Click Save As.

    The Save As dialog box appears.

  6. For File Name, type a name that identifies this test run configuration as the one to use for running tests on the specified host.

  7. Click Close.

  8. On the Test menu, point to Select Active Test Run Configuration.

    A submenu lists all the test run configurations in your current solution or project.

  9. To start the test run configuration that is configured to run tests under your host, click it.

    That run configuration will now apply when you run tests.

See Also