Alex Rivera | Logout

Where to place unit test project

Asked 2010-03-30T12:37:09.880
14

I'm thinking about where to put the unit/integration test project. I follow the 1 test project pr. project convention

I can think of 3 ways, that all seems good to me, which make it kind of hard to choose :-)

  1. Test project is put under a Tests sub folder to the project it tests.
  2. Test project is put next to the project it tests, in a "project".Tests folder. I believe this is what Roy Osherove recommends.
  3. Put all test projects in a sub folder in the root. e.g. \Tests\"project".Tests
  4. Something else?

What you choose and why?

Edit
Report

2 Answers

1

I'd go with #1 so that when you do a checkout of the project, you have the tests as well. Otherwise, tests become even MORE of an afterthought.

answered 2010-03-30T12:44:30.777
0

The default in a Visual Studio 2010 Asp.Net MVC solution is a different project within the same solution. This is a big help when it comes to testing compilation with all your references.

answered 2010-03-30T12:49:57.793

Your Answer