Udostępnij za pośrednictwem


How to: Customize Test Views

Use the Test List Editor and the Test View window to view information about the tests in your solution. You can customize these views in various ways to see specific tests. You can view all the tests in your solution or just a filtered subset; you can group them by properties, and, in the Test List Editor, view them arranged in test lists.

Note

The following procedures describe how to view, sort, and group tests, but not how to filter them. For information about filtering tests, see How to: Filter Tests.

You can perform some of the procedures in this section in the Test List Editor and some in the Test View window, as shown here:

Window

Procedures

Test List Editor

Showing Test Lists, Grouping Tests by Property, Showing Columns and Sorting Tests

Test View window

Grouping Tests by Property, Showing Columns and Sorting Tests

Showing Test Lists

View tests by test list

  1. Open the Test List Editor.

    The test list pane displays the test list hierarchy just like it was last displayed. For example, if the "ShoppingCart" list was displayed when this pane was last open, it again displays the "ShoppingCart" list.

    Note

    Your solution may contains no test lists; for information about now to create them, see How to: Create a Test List.

  2. To view tests in a specific test list, click the name of that list in the test list pane. If necessary, first expand parent lists to view their child lists.

For more information about how to work with test lists, see How to: Organize Tests into Test Lists.

Grouping Tests by Property

To group tests by property

  1. Click Group By in the toolbar of the Test List Editor or the Test View window.

    A drop-down list displays the available properties, such as Namespace, Class Name, Project, Owner, or Revision.

    Note

    The properties used to group tests overlap with properties of tests. To see all the properties of a test, click the test in either the Test View window or the Test List Editor and press F4 to display the Properties window.

  2. Click a property from the drop-down list. For illustrative purposes, click Test Enabled.

    The tests currently being displayed in the Test List Editor are grouped by the property you chose, with each grouping minimized. In this example, the groups shown are one or both of Test Enabled:True and Test Enabled:False.

  3. Expand the Test Enabled:True group, right-click a test, and then click Disable.

  4. Expand the Test Enabled:False group. The unavailable test now appears there.

  5. Right-click the unavailable test and then click Enable.

    The test moves back into the Test Enabled:True group.

Showing Columns and Sorting Tests

To sort tests

  1. Open the Test List Editor or the Test View window.

  2. (Optional) Add, remove, or re-order columns. To do this, right-click a column heading and then click Add/Remove Columns. Next, use check marks to indicate which columns to display. To move a column to the left, click the column name and then click the up arrow. To move a column to the right, click the column name and then click the down arrow. When you are finished, click OK.

  3. (Optional) Click the heading of a column to sort tests by the values in that column. Click the heading again to reverse the sort order.

See Also

Tasks

How to: Organize Tests into Test Lists

How to: Filter Tests