Unit Test Folder Structure

[ moved from UnitTestsDefined ]

A USENET discussion of a good folder structure:

http://www.deja.com/threadmsg_ct.xp?AN=649350737

So now, the question is how do structure the folder structure of the tests. I don'twant to interminge code and tests because that distracts me from my code. I also don't want to hide my tests because that slows down the process.

Use the following structure. --Pierre G. Boutquin

Common
|
------ Bin
|
------ Source
|
------ Data
|
------ Tests
|
------ Doc
Project1
|
------ Common
  |
  ------ Bin
  |
  ------ Source
  |
  ------ Data
  |
  ------ Tests
  |
  ------ Doc
|
------ App1
  |
  ------ Bin
  |
  ------ Source
  |
  ------ Data
  |
  ------ Tests
  |
  ------ Doc
|
------ App2
  |
  ------ Bin
  |
  ------ Source
  |
  ------ Data
  |
  ------ Tests
  |
  ------ Doc
Project2
etc.

What happens when App2 re-uses a file or object or package found in App1? I'd feel like adding a symbolic link somewhere.

Common files go in the common directory. There is a common directory at the project level for files that get reused from project to project and a common directory under each project to store files that 2 (or more) apps in the same project share.


I see the point here. This is kind of like the structure we have here on a C++ project. Except every app has a structure too, not a plain collection of sources. I came from Smalltalk background and having to manage so many files hurts me... But worse, people here are not terribly oriented to reuse by themselves, and having complicated structure virtually prohibits most reuse attempts. The ability to make "links" in VCS helps somewhat, but this doesn't seem to be enough. One of the things that makes me feel frustrated are discussions about where to put stuff, typically resolved within a day (!) with the project manager being involved. (Typical arguments include: "Because it's the way to do things".) Sorry for the absence of concrete suggestions, but I've yet to find my own way of using C++ within the implied programming environment and culture. -- PavelPerikov


We have been having trouble setting up unit testing under VisualBasic, or in particular under VisualSourceSafe because we found that VSS works much better if everything's in one folder. And it seems that the key to testing is making it easy to run the tests. If it's a pain to run the tests, you put off running them. Some say this has already happened.

Running under VisualBasic and VisualSourceSafe there are a few possibilities:

-- AaronHumphrey


CategoryTesting


EditText of this page (last edited January 5, 2005) or FindPage with title or text search