Share via


How to: Change the State of a Test Case to Closed

If you accidentally create a test case, or your team no longer needs a test case, you can change the state of the test case to closed using Microsoft Test Manager. Closed test cases are still in your team project, and are displayed in test suites to which they already belong. Test results for closed test cases are not removed. Closed test cases will only appear in the results list for queries that do not exclude closed test cases.

Requirements

  • Visual Studio Ultimate, Visual Studio Premium, Visual Studio Test Professional

Note

You cannot delete a test case from your team project by using Microsoft Test Manager.

Change the state of a test case to closed

To change the state of a test case to closed

  1. Open Microsoft Test Manager.

    Note

    To display the Microsoft Test Manager window, choose Start, and then choose All Programs. Point to Microsoft Visual Studio 2012 and then choose Microsoft Test Manager.

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

    The Contents pane is displayed.

  3. Select the test suite in the test suite hierarchy pane that contains your test case.

  4. To open the test case to change the state, double-click the test case listed in the Test Suite Details pane.

    Note

    If you just want to remove a test case from a test suite, you can select the test case and choose Remove.

  5. Choose State and then choose Closed.

  6. (Optional) In the History tab, type Test Case Is No Longer Required to explain why the manual test case is closed.

  7. To save your changes, choose Save and Close.

    When you view test cases from the test case manager, closed test cases are still displayed. To customize the test case manager to show only open test cases, see the following procedure. For other ways to filter on data columns, see How to: Change and Filter the Data Columns in Microsoft Test Manager.

Customize the test case manager view

To customize the test case manager view

  1. Open Microsoft Test Manager.

    Note

    To display the Microsoft Test Manager window, choose Start, and then choose All Programs. Point to Microsoft Visual Studio 2012 and then choose Microsoft Test Manager.

  2. To open the Test Case Manager, choose the down-arrow on the center group switcher and choose Organize.

  3. In the center group menu bar, choose Test Case Manager.

    The Test Case Manager is displayed and all the test cases are shown in the list.

    Note

    All active and closed test cases are displayed in this view.

  4. To change the query that is used by default to show all the test cases, choose Unfiltered and point to Edit filter.

    The Edit filter view is displayed.

  5. To add a new clause to the default query for the test case manager to only show the test cases that are not closed, choose Choose here to add a clause and select the following values for each field:

    And/Or

    Field

    Operator

    Value

    And

    State

    <>

    Closed

  6. To add more clauses to your query to customize the test cases returned, choose Choose here to add a clause.

  7. Choose 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. Choose the drop-down arrow to select 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 have to have in order to obtain 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, choose 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.

  8. Repeat steps 6 and 7 to add all the values for which you want. Then choose Save query to save this query as the default query for the test case manager.

    Note

    To clear this query and reset to the original query, choose Filtered and point to Reset filter.

See Also

Tasks

How to: Remove a Test Case from a Test Suite

Concepts

Creating Manual Test Cases