For the last 7-8 months we have rolled a test project per production project. And it worked just fine when we started it. But over this weekend I have collapsed all test projects into one because many test project became a headache. And here are my reasons:

  1. The more projects you have in your Visual Studio solution, the slower VS is. I don’t know why that is, but for half-day I have tried excluding all extra projects and trying working with VS and it was much more snappier and happier. And we had 13 projects in our solution with total number of lines just above 133K (not including JS and HTML). And VS memory consumption have reduced in half when I went from 13 to 5 projects – that also made my PC happier.
  2. Package management on one test project takes 10 times less than on 6 projects. Every time you get new version of Moq, you need to update all your test projects. Or just one.
  3. Every time your production project gets a new dependency, you need to add that to your test projects. Or just one project.
  4. Did I tell you, dependency management gets 10 times easier with single test project?
  5. Less projects => less maintenance costs. And you don’t want to maintain test projects.

And what is the point of having a test project per project? Please somebody tell me! I have started that because I read that in books. Well, the books are wrong! There is no benefit of having test-project-per-project. Only headaches and slow Visual Studio.