How to: Add a Test Case to a Test Suite
You can add existing or new test cases to your test suite at any time using Microsoft Test Manager. When you add a test case to your test suite, a pairing of the test case with each default configuration for the test suite is added to the test plan. When you run the tests from the test plan, these pairings will be shown and each can be run individually and test results will be saved for it.
To include new test cases for a test suite that was created by using a query, you may want to change the query. For more information about these types of suites, see How to: Create and Manage Query-Based Test Suites.
If the test suite was created by adding a requirement to the test plan, any existing test cases or new test cases that you add to the test suite will automatically be linked to the requirement.
Use the following procedure to add a test case to a test suite that is not a query-based test suite.
To add a test case to a test suite
Open Microsoft Test Manager.
To display the Microsoft Test Manager window, click Start, and then click All Programs. Point to Microsoft Visual Studio 2010 and then click Microsoft Test Manager 2010.
From the Testing Center, click Plan and then click Contents.
The Contents pane is displayed.
Select the test suite in the test suite hierarchy pane that you want to add test cases to, and then click Add.
The Add test cases to suite dialog box is displayed. All available test cases are shown in the list of tests.
Tests that have already been added to the test suite are not shown in the list of tests.
(Optional) If there are several test cases listed, you can narrow your test case search by changing the query for test cases as shown in the following steps.
To add a new clause to your query, select Click here to add a clause.
Click each column in the query clause to fill in the clause. If a column has a list of accepted values, a drop-down arrow appears when the column is selected. Click the drop-down arrow to select a value from the list. The following columns are available:
How to complete
Select And if this clause and the previous clause must be true to match a result. Select Or if either this clause or the previous clause must be true to match a result.
The list for this field contains all the searchable work item fields used in the current Team Foundation Server. Use as many clauses and fields as you want to get useful results. Press ALT+DOWN ARROW or type the field name that you want to select.
Examples of operator choices are = (equal), <> (not equal to), > (greater than), < (less than), >= (greater than or equal to), <= (less than or equal to), In, Was Ever, Was Never, and Contains.
Specifies the value that you are looking for in the specified field. If there is a list of values to select from, click the drop-down arrow to select the one that you want. Team Foundation work item tracking includes some query variables to dynamically add values to your query. For more information, see Query Variables.
Repeat the previous two steps to add all the values for which you want to search.
To see the results of your query, click Run to run the query.
Select the tests that you want to add, and then click Add test cases.
The test cases that you selected are now displayed in the test suite details pane.
All the existing test cases that you add, or new test cases that you create, are paired with each default configuration to define what tests must be run on which configurations for the test plan. To see these pairings, select the test suite and click Configurations.
To create a test case and add it to this test suite, click New.
The New Test Case dialog box is displayed.
Enter the details for your new test case including the actions and expected results for each test step, and then click Save and Close.
The new test case is now displayed in the test suite details pane.
For more information about how to create new test cases, see How to: Create a Manual Test Case.
Repeat the previous two steps to add more test cases.
The changes that you have made to the test suite in the test plan are automatically saved.
To add a copy of an existing test case to the test suite, right-click a test case in the test suite details pane and point to Create copy and add to suite. The new test case dialog box is displayed so that you can edit the test case as necessary.