Search code examples
.netvisual-studiounit-testingsolution

Tests Projects In Solution


In .NET should you place unit test projects in with the rest of the solution? Or should there be a test solution that houses all the test projects?

We have all the test projects in with our code base solution...it seems a bit cumbersome.

What do you usually do?


Solution

  • In our current project we decided to put all unit tests in separate projects. The application code and tests are in the same solution, but at least we can build (and deploy) a version without the unit test code.

    The downside of this -so far- has been that sometimes your unit tests can't reach certain members of the application code (protected and internals), but that usually lead us to discover that our design could be improved.

    And I guess I should point out a similar thread Here with more answers on the same/similar topic.