How to: Create an Ordered Test

An ordered test is a container that holds other tests and guarantees that tests run in a specific order.

Note

Before you start this procedure, you must have other tests available to include in the ordered test.

To create an ordered test

  1. On the Test menu, click New Test.

    The Add New Test dialog box appears.

  2. Click Ordered Test.

  3. (Optional) In the Test Name box, change the name of the test.

  4. (Optional) In the Add to Test Project box, select a different test project or create a new test project.

  5. Click OK.

    The ordered test opens in the main document editing window. You will use this window to select and include tests in the new ordered test.

  6. (Optional) Change the selection of tests to choose from. Click the down arrow under Select Test List to View, and then click Tests Not in a List, All Loaded Tests, or a specific test list.

  7. Under Available tests, click a test to select it. You can select multiple tests by using SHIFT+click and CTRL+click.

  8. To move the test or tests into the ordered test, click the right arrow.

    Note

    You can add the same test multiple times to the same ordered test. When you do this, the test will be run as many times as it appears in the ordered test, in the order listed.

    To remove a test from the ordered test, click the test in the Selected tests pane and then click the left arrow. To remove multiple tests at one time, select them by using SHIFT+click or CTRL+click, and then click the left arrow.

  9. (Optional) Re-order the tests within the ordered test by clicking a test in the Selected tests pane and then clicking the up or down arrow. To re-order multiple tests at one time, select them by using SHIFT+click or CTRL+click, and then click the up or down arrow.

    Note

    Checking Continue after failure means that the ordered test will run regardless of the failure of one or more tests. Leaving Continue after failure unchecked means that the ordered test will stop running after the first occurrence of a test failure.

The ordered test is ready to run. For more information about how to run tests, see How to: Run Automated Tests from Microsoft Visual Studio.

See Also

Tasks

How to: Run Automated Tests from Microsoft Visual Studio