Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

.Net: Best Way To Organize Unit Tests

Name: Anonymous 2012-03-29 8:37

I am personally used to creating a test project per every single project for which unit tests are being written, and keeping them in the same solution, but it seems to me that some people do not believe that is the best (notable observations include that it bogs down the solution when you get to over 100+ projects, and that it can be difficult to separate the unit test binaries from the delivered product) Some of the other concepts I have seen include creating a separate solution for all the unit test projects, and some even suggest putting all the test cases in a single project (to me, that sounds like a bad idea) either inside the regular solution it is associated with, or  in its own solution.

What is everyone's take on this?

Name: Anonymous 2012-03-29 8:50

Op again, I'd also like to add a little bit of context with the situation. I have started working on a relatively young project that started as an R&D proof of concept that was then given funding to become a full program in its own right. I guess as is the natural order of things, in an R&D project, certain processes are sacrificed for the sake of speed and the like (and also, most r&d type projects are meant to be a quick proof of concept project)

That being said, now that it has come out of the r&d world, certain quality control processes need to be instated to satisfy corporate and to satisfy the customer, and one of the initiatives is a push towards continuous integration and automated testing. I have just recently got a continuous build server to compile the solution on each checkin, so the last leg is to figure out what might be the best way to add unit testing to the end of the current workflow as well as just the automatic compile. We are using CruiseControl.net which looks like it has very simple faculties to add the unit testing after the build, but I just wanted some feedback before I proceed with a particular organizational structure.

Name: Anonymous 2012-03-29 9:01

I can't talk for myself, but one co-worker puts them on another "solution" (god i hate that buzzword)

As for me.-.. I can't help you. I'm lucky and i work with perl :D i just put my tests on a t/ folder.

I once had to work with C#, and i did the same as with perl, running the compiler from the command line and using nunit-console. But i'm guessing you are using the IDE and have no choice but using it.

Name: Anonymous 2012-03-29 10:28

Well, the hope is that we can get a continuous integration server to run all the unit test automatically after every check in. It is already able to build on every check in and it sends out an email if the project can no longer build because of an inadvertent regression, we just kinda want to extend that to also do the unit test also. Next step after that would hopefully be an automated collection of metrics, or continuous deployment to our virtual machine test environment.

Thanks for the input though.

Name: Anonymous 2012-03-29 11:50

Please go back to http://stackoverflow.com, thank you!

Name: Anonymous 2012-03-29 12:59

>>5
go back to your burger king shift. the customers are waiting.

Name: Anonymous 2013-09-01 14:38


That's because you're looking at it the wrong way. When you see a cyclone from the top, you are seeing where it is releasing the air that it sucks up. Thus, the direction of reference is traveling outward from the center along the spiral, not inward.

Name: Anonymous 2013-09-01 14:46

>>7
Now it makes sense

Don't change these.
Name: Email:
Entire Thread Thread List