Organization of the unit test project for large solutions

I need to add unit tests for an existing solution with a lot of projects. Building a project takes a lot of time, so I decided to create another separate solution for unit test projects. I do not know which is better: a link to the dll or to include in the unit test the solutions of existing projects that I want to check.

How do I organize my test cases and why? Please base your answers on your own direct experience.

+5
source share
3 answers

I highly recommend including the project you want to test in the solution and referencing this project.
In one large project, I referred only to DLLs and had a lot of problems with unit tests testing old versions of the DLL, because creating a unit test project did not automatically initiate the assembly of the project that it was testing.

+4
source

Sergey, as Daniel Hilgart points out, it is advisable to include unit test projects in your main solution. In addition, it is advisable to have a 1: 1 ratio between your development projects and unit test projects.

It is important to note that the number of projects in the solution increases the assembly time in a non-linear way.

, , 97 ! 10 . , 2 LOC.

, "", . , , - , ..... //IDE , 10 , : ", !". , , , - ; -)

.

  • dev ( dev)
  • dev- .
  • Visual Studio . , build/run/debug , (, ).
  • , dev + unit test, .

, , , -, . , , . IDE, , , , .

, , . city build -? , , , TC.

,

+3

, .

, , Solution Load Manager , . , .

+2

All Articles