Alex Rivera | Logout

Do you put unit tests in same project or another project?

Asked 2008-12-07T02:56:36.697
185

Do you put unit tests in the same project for convenience or do you put them in a separate assembly?

If you put them in a separate assembly like we do, we end up with a number of extra projects in the solution. It's great for unit testing while coding but how do you release the application without all of these extra assemblies?

Edit
Report

1 Answer

3

I fluctuate between same project and different projects.

If you're releasing a library releasing the test code with the production code is a problem, otherwise I find it usually isn't (although there's a strong psychological barrier before you try).

When putting tests in the same project I find it easier to switch between tests and the code they test, and easier to refactor/move them around.

answered 2008-12-07T09:11:14.337

Your Answer