Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Test Edition
Testing Tools Tasks
Managing Tests
 How to: Filter Tests
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio Team System
How to: Filter Tests

You can filter the display of tests using controls on the Test List Editor toolbar and the Test View window toolbar.

Why would you want to filter tests? You might be working in a build lab and need to determine whether a specific bug is still present, so you filter out all tests that do not apply. This might mean filtering to include only Web tests, or only load tests, and so on. Or you might need to test a specific method or class, so you filter to include only the unit tests that apply.

To filter the display of tests

  1. In the toolbar of the Test List Editor or the Test View window, click the down arrow in the Filter Column list box, and then click a property by which to filter.

    Example properties to choose from are Namespace, Class Name, Owner, Project, Test Enabled, and Test List Name.

    TipTip:

    Selecting a property to filter by does not add that property as a column. To add a column, right-click the column headings and click Add/Remove Columns. Then, in the Add/Remove Columns dialog box, select columns to add and define the order in which they appear, using the Move Up and Move Down buttons. When you are finished, click OK. For more information, see How to: Customize Test Views.

  2. In the Filter Text list box, type a string value by which to filter.

    For example, if you have selected Class Name as the Filter Column, you could type the name of a class, "BankAccountTest," for the filter text.

    NoteNote:

    Filtering is not performed in a case-sensitive manner. "BankAccountTest" and "bankaccounttest" produce the same results.

  3. Click the Apply Filter button.

    The filter is applied. Only tests that have the chosen value for the chosen criterion, as displayed in the Filter Column list box, are displayed.

To stop filtering tests

  • To show all tests, you can clear the filter that is currently in use. To do this, in the Filter Text list box, click <Clear Filter>.

    If you are using the Test View window, it displays all the currently loaded tests.

    If you are using the Test List Editor, it displays all the tests in the currently selected test list. If no test list is selected, the contents of the current selection, such as All Loaded Tests or Tests Not in a List, are displayed.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker