Walkthrough: Managing Tests Using Lists and Properties
By using test lists, you can logically group tests and then work with those tests as groups instead of individually. Test lists are especially useful when you have a large number of tests.
Prerequisites
Follow the steps in the procedure "Create a Unit Test" in Walkthrough: Creating and Running Unit Tests.
Manage Tests Using Test lists
To manage tests using test lists
In Visual Studio, open the Test List Editor. To do this, click Windows on the Test menu and then click Test List Editor.
Click the All Loaded Tests folder in the Test List Editor.
All the tests in the current project are displayed.
To create a new test list, right-click the Lists of Tests folder and click New Test List.
The Create New Test List dialog box appears.
In the Name field, type BVTs as the name of the test list, and click OK.
The BVTs list is created and displayed in the hierarchy pane of the Test List Editor under the Lists of Tests folder.
Click the Tests Not in a List folder in the Test List Editor.
Highlight DebitTest and CreditTest in the data pane of the Test List Editor. To do this, hold down the CTRL key while clicking both tests.
With the tests highlighted, drag them into the BVTs list.
Click the BVTs list in the hierarchy pane.
This displays its contents, DebitTest and CreditTest, in the contents pane.
Right-click the BVTs list in the hierarchy pane and click Create New Test List.
The New Test List dialog box appears.
In the Name field, type Bank as the name of the test list and click OK.
The new test list is created and displayed in the hierarchy pane of the Test List Editor as a list under BVTs.
Click All Loaded Tests in the hierarchy pane.
Copy the DebitTest unit test into the Bank test list. To copy the test, while pressing the CTRL key, drag DebitTest into the Bank test list.
A new instance of the DebitTest test is created and placed in the Bank test list.
In the hierarchy pane, click All Loaded Tests.
Right-click one instance of DebitTest and click Disable.
Notice that both instances of DebitTest are disabled.
See Also
Tasks
Walkthrough: Creating and Running Unit Tests
Walkthrough: Using the Command-line Test Utility
Walkthrough: Run Tests and View Code Coverage