Geeks With Blogs

News My Blog has been MOVED to
Michael Freidgeim's OLD Blog My Blog has been MOVED to
Some time ago I have discussion with my co-worker  how to organize test projects. 
Should we have a single test project that does all sorts of things and references every project?
It is good to have one integration test dll, but for unit tests, what is the point merging everything into one.

In ideal world I agree that small independent projects are better. Unfortunately we have  solution size limitations 
However, Visual Studio performance quickly degrades as the number of projects increases. Around the 40 project mark compilation becomes an obstacle to compiling and running the tests, so larger projects may benefit from consolidating test projects.

  • Single solution. If you work on a small system, create a single solution and place all of your projects within it.
  • Partitioned solution. If you work on a large system, use multiple solutions to group related projects together. Create solutions to logically group subsets of projects that a developer would be most likely to modify as a set, and then create one master solution to contain all of your projects. This approach reduces the amount of data that needs to be pulled from source control when you only need to work on specific projects.
  • Multiple solutions. If you are working on a very large system that requires dozens of projects or more, use multiple solutions to work on sub-systems but for dependency mapping and performance reasons do not create a master solution that contains all projects.
At the moment we decided to go with one huge integration test and one huge unit test projects.
And we constantly trying to keep reasonable (not too many) number of projects in the main solution. Unfortunately this number is quite big - 70+. 
Posted on Sunday, June 9, 2013 12:11 PM .Net Framework , Testing/Debugging/Logging | Back to top

Comments on this post: Number of Unit test projects in Visual Studio solution

# re: Number of Unit test projects in Visual Studio solution
Requesting Gravatar...
This MSDN article had a nice way to structure the solution using VS folders for an MVC application. Granted this is a solution of 10 or less projects. I've worked with a lot of projects in the same solution also and it is a pain (especially when I was on WinXp and only 3 gb or RAM). I've also used the build configurations to only build the projects I'm interested in at the moment (like web or services specific).

Thanks for the article.
Left by Kevin on Jun 10, 2013 11:37 PM

Your comment:
 (will show your gravatar)

Copyright © Michael Freidgeim | Powered by: