다음을 통해 공유


Test View – your new most used window

Let’s take a look at the Test View tool window – the place where you will be running your tests from as you develop and debug them. Test View provides you with a flat list of all your tests, with each test only listed once. From this window you can easily manipulate the properties of your tests, easily edit the test themselves, and execute one or more tests under a specific run configuration.

 

Let’s take a quick tour round the window.

At the top of the window we have the toolbar:

 

Group By Drop-down: This allows you to group your tests by the value of certain properties. With only 10-20 tests this isn’t really an issue, since you can navigate and find most of the items by sight. but when you’ve got 100’s of tests it’s must harder. With Group By, the tests are (duh) grouped by their property and those groups can be collapsed to just their header to save space. The properties listed are a union of all the properties available for all test types.

 

Run Tests: ‘nuff said. This will run your tests. Depending on your configuration this may show the Run Configuration dialog.

 

Customise: This allows you to add/remove columns from the test list, and also arrange the order of those columns. You can also arrange the order of the columns through drag & drop of the header columns in the test list.

 

Edit Run Config: This allows you to edit your run configuration settings and save those changes to the solution run configuration. This is a convenient way to change settings without running your tests.

 

Column Header: Exactly as you’d expect.

 

Test List: This is where you will see all of you your tests of all types listed. You can select one or more tests (of multiple types) and interact with them (run, edit, etc). From this window it is possible to drag & drop tests onto Test Explorer for easy categorization.

 

From this list, its possible to display a context menu. The items on this context menu can vary from test type to test type, but I’ll cover the basic items here:

Edit: Allows you edit a manual test. This will bring up word if you are editing a MHT test.

 

Goto Source Code: This will allow you to right click a test in test view and jump straight to the source code without hunting it down. Very useful.

 

Run Selection: As per the run button on the toolbar.

 

Delete: This only works for Manual Tests at the moment and removes (but doesn’t delete) the manual test from the project.

 

Open Test Explorer: Shows test explorer or brings to the front if it’s already open.

Comments

  • Anonymous
    May 24, 2004
    You wrote (about the context menu):
    "Delete: This only works for Manual Tests at the moment and removes (but doesn’t delete) the manual test from the project."

    Excuse me, but wouldn't it be better to just name it 'Remove' then? :)
  • Anonymous
    May 25, 2004
    I've just blogged about test property stuff (http://blogs.msdn.com/dhopton/archive/2004/05/25/141457.aspx)

    As for unmanged C++ - No, we dont have direct support for Unmanaged C++. I can't see why you could do some P/Invoke into your Native C++ if you wanted to.
  • Anonymous
    May 25, 2004
    Couple questions:
    1) Is it possible to add arbitrary properties to tests? (This would be to allow sorting and filtering, obviously.)
    2) Will the unit test support extend to unmanaged C++ code as well, or is this .NET-only?
  • Anonymous
    May 25, 2004
    Right now, You can add properties via the [TestProperty] attribute. Hmm. Maybe I should blog about this...
  • Anonymous
    May 26, 2004
    Although should not be saying unmanaged or native C++. The C++ team is trying to make things be just C++, chedk out:
    http://blogs.msdn.com/branbray http://blogs.msdn.com/hsutter
  • Anonymous
    May 26, 2004
    Hmm. I couldn't anything on my quick look over those two blogs - but I do recall something along those lines. None the less, how can I differentiate between C++ that is running on the CLR vs that which is running natively.

    I do know that the only support for C++ we have is for code which is compiled for and executed within the CLR.