By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,058 Members | 1,217 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,058 IT Pros & Developers. It's quick & easy.

Visual Studio Unit Test in large Solution - Layout

P: n/a
I was wonder if there is any protocol or suggestions on how to setup unit
testing projects in large solution???

If you have a large solution of say 50 projects and add a project for every
unit test it could get overwhelming - is there some standards on how to set
this up???
Has anyone integrated this into Continuous Integration ???

Thanks
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Jun 11, 7:16*am, sippyuconn <sippyuc...@newsgroup.nospamwrote:
I was wonder if there is any protocol or suggestions on how to setup unit
testing projects in large solution???

If you have a large solution of say 50 projects and add a project for every
unit test it could get overwhelming - is there some standards on how to set
this up???

Has anyone integrated this into Continuous Integration ???

Thanks
I use NUnit and what I do is add a project to the solution that is
used exclusively as a container for unit tests. I then reference the
other projects and write unit tests that excersise the public API from
each.

I have toyed with the idea of adding unit tests directly to each
individual project and using the conditional compilation mechanisms
for determining whether they should be included in a release or debug
build. Has anyone else had a good experience with this method?
Jun 27 '08 #2

P: n/a
Hi Sippyuconn,

Generally speaking, we create a test project for a project to be tested. So
if you have 50 projects, you create 50 test projects. Each test project
contains test classes as many as the classes in the project to test. Each
test class in the test project contains test methods as many as the methods
in the class to test.

To create a test project for a project, open the code editor for a class in
the project and right-click the namespace and select 'Create Unit Tests'.

To manage large numbers of tests, you can use the Test Manager window to
organize tests into hierarchical structure. This structure consists of test
lists, which helps to have the capability of visualizing the tests in
groups or lists. You can also run the tests in a list by first selecting
the list in the Visual Studio IDE, or you can run the tests in a list using
the command-line test utility.

For more information on generating Unit Tests and managing large numbers of
tests, see the following MSDN documents:
'How to: Generate a Unit Test'
http://msdn.microsoft.com/en-us/library/ms182524.aspx

'Walkthrough: Managing Tests Using Lists and Properties'
http://msdn.microsoft.com/en-us/library/ms182466.aspx

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.