Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

September 16, 2012

Searching and Grouping in VS 2012 Test Explorer

Filed under: C#,Testing,VB.NET,Visual Studio @ 2:59 pm

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

image

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

image

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

image

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.

image

Use these techniques to filter and group the tests in the Test Explorer window.

Enjoy!

EDITED 9/28/12 to correct typographical errors.

2 Comments

  1.   Richard — September 28, 2012 @ 9:43 am    Reply

    Small typo: it’s “Test file path”, not “Text file path”.

  2.   DeborahK — September 28, 2012 @ 12:12 pm    Reply

    Thanks Richard. I made the correction in the above text.

RSS feed for comments on this post. TrackBack URI

Leave a comment

© 2019 Deborah's Developer MindScape   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs