Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

How to: Create and Manage Test Suites

Visual Studio 2010

You can create test suites in your test plan by selecting the test cases that you want to add to a test suite from a list of all the test cases in your team project. You can also add new test cases as necessary.

By grouping your test cases, when you want to run all these tests, you can select this test suite. For more information about how to run the tests in your suite, see Running Tests.

The test suites in your test plan are added and managed as part of a hierarchy that includes a root node. The root node test suite has the same name as the test plan. It contains all other test suites. Test suites that are not query-based or created from a requirement can contain other test suites in addition to test cases. The following illustration shows the test suite hierarchy.

Test Suite Hierarchy
NoteNote

Query-based test suites or suites created from a requirement cannot contain any other test suites.

You can use the following procedures to add and manage test suites in a test plan:

To add a test suite and test cases to a test plan

  1. Open Microsoft Test Manager.

    NoteNote

    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.

  2. From the Testing Center, click Plan and then click Contents.

    The Contents pane is displayed.

  3. Select the location in the test suite hierarchy pane where you want to create this test suite and then click New in the pane that shows the test suite hierarchy.

    NoteNote

    The test suite hierarchy has a root node that has the same name as the test plan. You can add test cases or test suites to this test suite root node, but you cannot rename it.

  4. Type the name for your new test suite.

    The name will also be displayed in the test suite details pane.

  5. (Optional) Click State and select from the list of states based on the following table:

    State

    When to use it

    In Planning

    If you are not yet ready to run the tests in this test suite.

    In Progress

    When you are ready to run the tests in this test suite.

    Completed

    When you have finished running the tests in this test suite and the quality level reached meets your goals.

    Important noteImportant

    To run tests, you must set the status of a test suite to In Progress.

  6. To change the default configurations for the test suite you created, if you want them to differ from the default settings for the plan, click the drop-down arrow at the end of the list of configurations.

    The dialog box is displayed that shows all the configurations for your team project and the current default configurations for your test plan.

  7. You must first clear Use configurations from parent test suite, and then select the default configurations that you want to add and any that you want to remove.

    NoteNote

    Changing the default configurations only affects new test cases or test suites that are added to this test suite. For more information about how to change the pairings of tests and configurations that are already in your test plan, see the procedure about how to update configurations for specific test cases.

  8. (Optional) To add a new configuration or manage existing configurations, click Manage.

    The Test Configuration Manager activity is displayed. For more information about creating configurations using the test configuration manager, see How to: Create Test Configurations.

  9. To save your changes to the default configurations, click Save.

  10. To add an existing test case to this test suite, click Add.

    The Add test cases to suite dialog box is displayed. All available test cases are shown in the list of tests.

    NoteNote

    Tests that have already been added to the test suite are not shown in the list of tests.

  11. (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.

    1. To add a new clause to your query, select Click here to add a clause.

    2. 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:

      Query Column

      How to complete

      And/Or

      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.

      Field

      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.

      Operator

      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.

      Value

      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.

    3. Repeat the previous two steps to add all the values for which you want to search.

    4. To see the results of your query, click Run to run the query.

  12. 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.

    NoteNote

    To add a copy of an existing test case to the test suite, right-click a test case 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.

  13. To create a test case and add it to this test suite, click New.

    The New Test Case dialog box is displayed.

  14. 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.

    NoteNote

    For more information about how to create new test cases, see How to: Create a Manual Test Case.

  15. Repeat the previous two steps to add more test cases.

    NoteNote

    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.

    The changes that you have made to the test plan are automatically saved.

To remove a test case from a test suite

  1. Open Microsoft Test Manager.

    NoteNote

    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.

  2. From the Testing Center, click Plan and then click Contents.

    The Contents pane is displayed.

  3. To select a test suite, click the test suite in the test suite hierarchy.

    The test cases in the test suite are displayed in the test suite details pane.

  4. To remove a test case from the test suite, select the test case in the test suite details pane and then click Remove in the toolbar.

    NoteNote

    The test case is only removed from the test suite. It can be added again later if you need it.

    The test case is no longer displayed in the test suite details pane.

Test suites can be moved to a different location in the test suite hierarchy.

To move a test suite

  1. Open Microsoft Test Manager.

    NoteNote

    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.

  2. From the Testing Center, click Plan and then click Contents.

    The Contents pane is displayed.

  3. To move an existing test suite, click the test suite and drag it to the node that you want to be the new parent for this test suite. Or right-click the test suite and point to Cut and then right-click the node to be the new parent and point to Paste.

    The test suite is now a child of that node and it is displayed in the new location in the test suite hierarchy.

    NoteNote

    If you move a test suite, all child test suites will be moved with it. You cannot move any test suite to be a child of a query-based test suite or a test suite created by adding a requirement to the test plan.

To rename a test suite

  1. Open Microsoft Test Manager.

    NoteNote

    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.

  2. From the Testing Center, click Plan and then click Contents.

    The Contents pane is displayed.

  3. To rename an existing test suite, right-click the test suite in the tree view of all the test suites and then click Rename.

    NoteNote

    You can also press F2 to rename a test suite.

  4. Type the new name for the test suite.

    The test suite is now displayed with the new name in the test suite hierarchy.

To delete a test suite

  1. Open Microsoft Test Manager.

    NoteNote

    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.

  2. From the Testing Center, click Plan and then click Contents.

    The Contents pane is displayed.

  3. To delete an existing test suite, right-click the test suite in the tree view of all the test suites and then click Delete.

    A confirmation dialog box is displayed.

    Important noteImportant

    You will no longer be able to view the test results for the test cases or test suites in this test suite. Also, any test suites that are children of this test suite are permanently deleted.

  4. To confirm deletion of the test suite, click Delete test suite.

    The test suite is no longer displayed in the test suite hierarchy for this plan.

Test suites can be moved to a different location in the test suite hierarchy.

To create a copy of a test suite

  1. Open Microsoft Test Manager.

    NoteNote

    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.

  2. From the Testing Center, click Plan and then click Contents.

    The Contents pane is displayed.

  3. To copy an existing test suite, right-click the test suite, point to Copy, and then right-click the node to be the parent for the copy of the test suite. Then point to Paste.

    The test suite is now a child of that node and it is displayed in the new location in the test suite hierarchy.

    NoteNote

    If you copy a test suite, all child test suites will be copied with it. You cannot copy any test suite to be a child of a query-based test suite or a test suite created by adding a requirement to the test plan.

Community Additions

ADD
Show:
© 2015 Microsoft