Share via


How to: Search for Test Cases from Microsoft Test Manager

You might want to search for all the test cases in your team project using Microsoft Test Manager, or you might want to search for only specific test cases. You can customize a query to search for only the test cases you want to see. For example, you can create a query to search for just the priority 1 test cases you own. You can save this query to use later.

There are two categories of queries.

  • Team Queries   These queries are available to everyone in your team project. Team Queries can only be created and modified by people who have been granted permission to create them by your team project administrator.

  • My Queries   These queries are available only to you.

Use the following procedures to view test cases and create queries to search for test cases:

  • View all test cases in your team project

  • Customize the test case manager view

  • Use pre-existing team queries to view test cases in your team project

  • Create a customized query to search for specific test cases

For more information about how to manage queries and folders, see How to: Create and Manage Queries for Searching.

Note

You can also search for test cases using Microsoft Visual Studio 2010. For more information, see Finding Bugs, Tasks, and Other Work Items.

View All Test Cases

To view all test cases

  1. Open Microsoft Test Manager.

    Note

    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. To open the Test Case Manager, click the down-arrow on the center group switcher and click Organize.

  3. In the center group menu bar, click 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. If you do not want to see the closed test cases, you can either create a customized view or create a query to view specific test cases. For more information, see Customize the test case manager view or Create a Query to View Specific Test Cases.

  4. (Optional) To filter the test cases that you see in this list, click the column header that you want to use to filter. For example, click Owner. Then click the drop-down arrow that is now displayed in the column header and select the values that you want to use to filter the test cases.

    The filter is immediately applied to the list and only the test cases that meet the criteria selected are shown.

    Note

    This functionality to filter lists by clicking a column header is available throughout 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, click Start, and then click All Programs. Point to Microsoft Visual Studio 2010 and then click Microsoft Test Manager 2010.

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

  3. In the center group menu bar, click 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, click 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, click Click 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, click Click here to add a clause.

    You can now add the clauses that you require for this query. For more information about how to specify the criteria for your query, see Specify Query Filter Criteria.

  7. After you add all the values that you want, click 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, click Filtered and point to Reset filter.

Use Pre-Existing Team Queries to View Test Cases

When your team project is created by your team project administrator, there are pre-existing test case queries that they can add. For example, My Test Cases is a pre-existing query that will return all your test cases.

To view test cases with pre-existing team queries

  1. Open Microsoft Test Manager.

    Note

    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. To open the Queries activity, click the down-arrow on the center group switcher and then click Testing Center.

  3. In the center group menu bar, click Track and then click Queries.

    The Queries activity is displayed.

  4. To view the pre-existing team queries, open the Team Queries folder.

  5. To run the pre-existing query, double-click the query that you want to run.

Create a Customized Query to Search for Specific Test Cases

To create a customized query to search for specific test cases

  1. Open Microsoft Test Manager.

    Note

    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. To open the Queries view, click the down-arrow on the center group switcher and then click Testing Center.

  3. In the center group menu bar, click Track and then click Queries.

    The Queries view is displayed.

  4. To select the folder where you want to create the query, click the folder in the queries folder hierarchy.

    Note

    You can create a subfolder and store your queries there. For more information, see "Create a Subfolder to Store a Query" in How to: Create and Manage Queries for Searching.

  5. To create a query, click the drop-down arrow next to Query, and point to the type of query that you want to create.

  6. To enter a name for this query, type the name.

    Important

    The first clause shown for the query makes sure that only items from your team project are returned in the results of the query. Do not change this clause.

  7. You can now add the clauses that you require for this query. For more information about how to specify the criteria for your query, see Specify Query Filter Criteria.

    To add a new clause to your query to select only test cases, click Click here to add a clause and select the following values for each field:

    And/Or

    Field

    Operator

    Value

    And

    Work Item Type

    =

    Test Case

    To add more clauses to your query to customize the test cases returned, click Click here to add a clause.

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

  9. (Optional) To change the columns or the sort order for the query results, click Column options.

    1. In the Column Options dialog box, select the columns to add from Available columns, click the arrow to add these columns to the Selected columns.

    2. Click Sorting and select the columns that you want to sort by.

    3. Click OK.

  10. (Optional) To group the query results by a column, drag a column header in the query results table to the title bar of the query results.

  11. When the query you created returns the test cases that you want to view, click Save on the toolbar.

    The query is now saved.

See Also

Tasks

How to: Create and Manage Queries for Searching

Concepts

Creating and Managing Tests