Unit Testing and Subversion - Where should I put the test classes?
I'm starting a strong push to institute Unit Testing in a relatively new project; I figure it will be easier to really get into the habits in a new project from the start, rather than trying to steer some of our ancient existing projects in that direction right away. But I've hit a snag... where should I keep the test classes?
We've been using Subversion to manage our project files since shortly after I started here... getting us into source control was one of my first imperatives. So our code is laid out nicely in folders:
Project A
|____ src
|____ lib
|____ docs
|____ db
Project B
|____ src
|____ lib
|____ docs
|____ db
In the src folder, I have things organized in packages like
src/edu.psu.ist.project-a.component-a
src/edu.psu.ist.project-a.component-b
So where do I put the test cases? I could put them in a test package at the root of the project:
src/edu.psu.ist.project-a.test.component-a
src/edu.psu.ist.project-a.test.component-b
But what I'm really leaning toward is mirroring the main folder structure of the package in a test package in the root of the repository, at the same level as the src folder:
src/edu.psu.ist.project-a.component-a
src/edu.psu.ist.project-a.component-b
test/testComponent-a
test/testComponent-b
My thinking is that the classes in the test package would not get deployed with my actual project code, so they shouldn't be in the real source package tree. But I'm still not sure.

So, in your example, "src/edu.psu.ist.project-a.component-b" would have its tests in "test/edu.psu.ist.project-a.component-b".
Unit tests are not supposed to test special "test" versions of your classes. They're supposed to test your real production classes, the classes you build your application with, the classes you deliver in your package. The classes you write for testing aren't compiled with the rest of your application because they're never imported.
You might also want to check out ASUnit: http://www.asunit.org/
This is actually a Java project (well, the server side part is), but I left that out of the post since it really doesn't matter. I had the same quandry with both CFCUnit and ASUnit. It's definitely an organization thing... I want to put assets somewhere that they make sense, and stick to that convention.