Searching and Grouping in VS 2012 Test Explorer
Posted
Sun, Sep 16 2012 12:59
by
Deborah Kurata
Visual Studio 2012 Test Explorer has extensive searching and limited grouping capabilities. (Visual Studio 2010's Test View window had more grouping options by way of its many sorting parameters.)
Searching
Entering text into the Test Explorer Search box filters the list of tests to those containing the entered text. In the example below, entering "customer" in the search box filters the list to all test names containing "customer".

By default, the search matches within the test name, but there are other choices. To view the other options, click the down arrow to the right of the Search box in the toolbar as shown below. Even though it looks a little like one large option name, these are actually three options:
- Test File Path
- Fully Qualified Name
- Test Result

Select one of these options, then type the search parameter within the provided quotation marks. Press the Enter key to execute the search.

Test File Path searches the paths to the test code files. In this example, the tests are in two components in two different directories:
- C:\Users\Deborah\Speaking\Other\AcmeCustomerManagement_BestKeptSecrets_2012\ACM.LibraryCSharpTest
- C:\Users\Deborah\Speaking\Other\AcmeCustomerManagement_BestKeptSecrets_2012\ACM.BLCSharpTest
The above example finds all of the tests in the LibraryCSharpTest component.
Fully Qualified Name searches the path and file name.
Test Result has several valid search parameters: "Not Run", "Skipped", "Passed" or "Failed". These options filter the list to defined test outcome.
Grouping
By default, the Test Explorer groups the tests by test outcome as shown in the prior screen shots. The only other group-by option is by duration. This groups by the time it took to execute the test.

Use these techniques to filter and group the tests in the Test Explorer window.
Enjoy!
EDITED 9/28/12 to correct typographical errors.