How to: Organize Tests into Test Lists
Visual Studio 2005 Team Edition for Testers provides one mechanism for creating groups of tests that persist: test lists. You create and manipulate test lists in the Test Manager window.
The following procedures describe how to work with tests and test lists.
Note
To change the way tests are displayed in the Test Manager window, without creating or changing persistent groupings (lists) of tests, use the Group By feature. For more information, see How to: Customize Test Views.
To organize tests into test lists
Open the Test Manager window.
If the test list you want does not already exist, create it. For more information, see How to: Create a Test List.
To see all your tests listed in the Test Manager window, click the All Loaded Tests node in the test list pane.
Select tests in the Test Manager window. For more information, see How to: Run Selected Tests.
Drag the selected tests from the Test Manager window into the test list.
Note
Only one instance of a test can exist in a test list. You cannot drag a test a second time into the same test list.
To move or copy tests between test lists
Open the Test Manager window.
In the test list pane, click a test list.
The list's tests appear in the contents pane of the Test Manager window.
Drag a test from the contents pane of the Test Manager window to the destination test list, in the test list pane.
This removes the test from the source test list and adds it to the destination list.
Note
A test can exist in more than one test list. To copy a test to a new list without removing it from the original list, press the CTRL key while dragging the test. Regardless of the number of test lists that contain a test, all instances of the test refer to the same test method.
Alternatively, you can move or copy tests by using the Cut, Copy, and Paste commands. First, right-click a test and then click Cut or Copy. Then, either switch to the destination node or test list and click Paste, or click the name of the node or test list in the test list pane and then click Paste. The test is then moved or copied to the destination node, such as All Loaded Tests, or test list.
To remove tests from a test list
Open the Test Manager window.
Highlight the test list that contains the test or tests you want to remove.
Right-click the test you want to remove, and then click Remove from Test List.
The test is removed from the list, but it is not deleted from the test project, nor is the list affected in any other way. You can always locate any test in the All Loaded Tests folder, regardless of whether it is present in one or more lists.
Note
You cannot remove tests from the All Loaded Tests node or from the Tests Not in a List node.