Jeremy has an excellent series of posts about getting started on a new project. He recently talked about organizing unit tests and a number of excellent developers shared their thoughts on how they organize their tests on projects.
One thing I thought may be worth sharing on the subject are "Solution Folders" in Visual Studio. My main reason for mentioning this is based on Phil Haack's recent blog entry, Structuring Unit Test Code, where he mentions the following:
"One convention I use is to prefix my unit test projects with "UnitTest". Thus the unit tests for Subtext are in the project UnitTests.Subtext.dll. The main reason for this, besides the obvious fact that it’s a sensible name for a project that contains unit tests, is that for most projects, the unit test assembly would show up on bottom in the Solution Explorer because of alphabetic ordering.
So then I co-found a company whose name starts with the letter V. Doh!"
Rather than letting the alphabetical nature of the Solution Explorer drive my naming conventions, I will typically toss my tests in a separate Solutions Folder that separates it from the rest of the core code, etc.

Not only do I get the ability to collapse and expand the folder, but if desired, I also have the wonderful capabilities of hiding the folder completely from view or unloading the projects so they don't participate in compiling.
Hopefully this helps.
Posted
Wed, Oct 11 2006 11:20 AM
by
David Hayden