c# - One or more unit test projects for solution -


i have console app 2 other class library projects -- totaling 3 projects -- in solution.

i want add unit test project. question add "unit test project" per "regular project" in solution or single unit test project can test three?

in other words, if projects proja, projb , projc, add 3 unit test proejects e.g. proja.tests, projb.tests, etc. or single unit test project can handle three?

if question can single unit test project can handle three? answer yes proceed next step depends. personally, tend put of tests in single project, separate folders within project each assembly (plus further sub-folders necessary.) makes easy run entire set within visualstudio. if have thousands of tests, single project might prove difficult maintain. split them out because don't want deploy them our product. whether split them out per library or per solution there merits both.

ultimately, want tests available developers, developers know find them when needed. want obstacle free environment minimal overhead writing new tests. tests must compile , execute - project structure can play part in of this.

you may want consider different levels of testing possible, such tests unit, integration or ui automation. segregating these types of tests possible in tools using test categories, it's easier execution or reporting if separate libraries.

in small projects there aren't lot of projects, 1:1 ratio preferred approach.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -