I'm working on a C# .net project using Visual Studio 2008, so my question is specifically for this case. However, the question should be the same to many other environments, so I'll be glad to hear opinions from people in similar environments.
My solution is organized in several projects. All of which have some belonging unit tests. There are several ways the tests can be structured, and I've felt the best way to handle this was to have one corresponding ".Tests"-project pr project. I.e. I have the projects:
MyApp.Model
MyApp.Utils
Giving me the corresponding projects for the tests;
MyApp.Model.Tests
MyApp.Utils.Tests
This very nicely wraps all tests that longs together into one project, giving one assembly for each "group" of tests. I've felt comfortable with this being the best way for a while, but as the application grows I get 2 new projects instead of one each time I add a new one. Now I think it's starting to get messy, and I'm considering to add one single MyApp.Tests
project to hold all my tests. The tests can still be nicely structured with a good file structure inside this project.
So; how are people structuring their tests?