473,757 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visual Studio Unit Test in large Solution - Layout

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
2 2603
On Jun 11, 7:16*am, sippyuconn <sippyuc...@new sgroup.nospamwr ote:
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
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****@microsof t.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1162
by: TestDriven.NET | last post by:
TestDriven.NET, the FREE one-click unit testing add-in for Visual Studio .NET is now available: http://www.testdriven.net/news.htm TestDriven.NET makes it easy to run unit tests with a single click, anywhere in your Visual Studio .NET solutions. It supports ALL versions of Visual Studio .NET - meaning you don't have to worry about compatibility issues and fully integrates with all major unit testing frameworks including NUnit, MbUnit...
27
2039
by: Richard Blewett [DevelopMentor] | last post by:
I've just seen on Eric Gunnerson's blog that C# is getting Edit and Continue in Whidbey. That will please alot of people - although me, I have mixed feelings about it ;-) http://blogs.msdn.com/ericgu/archive/2004/10/15/242931.aspx Regards Richard Blewett - DevelopMentor http://staff.develop.com/richardb/weblog
4
3206
by: yuanliu1 | last post by:
Hi, I am debugging my code of visual c++ 6.0. I found it is extremely slow to run after the code is compiled as "debug" mode and OK as "release mode", I would say the difference is around 10x. But I am developing and mainly working on "debug" mode, it is very clumsy to wait for 10 mins for just one run. I did a check and I suppose it is related to the heap check in "debug" mode, so I am wondering if I can turn it off in visual c++ 6.0...
4
1511
by: cmay | last post by:
I have been looking on and off for the past 6 months or so for some kind of guidance for creating asp.net unit tests with Visual Studio Team System, but I have yet to find anything significant. Does anyone know of any books/articles that address this? Right now I created a very basic page and created unit tests for it only to find that my webcontrols are not initialized when running the unit tests. So either I am doing something wrong...
0
1000
by: usenet | last post by:
I have a large .Net solution that includes several projects and a large number of unit tests. I find that if I 1) Run my tests 2) Find a problem in a unit test 3) Set some breakpoints to help debug the problem 4) Attempt to run the unit test again from the test results screen Then Visual Studio hangs for about a minute before the test begins However if I make some changes and then start the unit test then it recompiles the projects the...
1
2037
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
I'm using Visual Studio 2005 Team Edition for Software Developers. I've created new a test project and tests using the wizard under Test -New Test... That seemed to work. I checked in my new test cases last night. This morning, I checked out my new test case project, my solution file, and even my vsmdi file. Every time I run the wizard, I select Unit Test Wizard and click okay, and the wizard dialog box simply disappears.
0
7334
jwwicks
by: jwwicks | last post by:
Introduction This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the beginning CIS student who is struggling to get their programs working. I work in the computer lab at the college I'm attending and I see many students who don't know how to use the IDE for best results. Visual Studio automatically creates a number of...
1
3834
RRick
by: RRick | last post by:
I have a unix C++ project that needs to be converted over to windows visual studio. I'm not sure of the exact version of VS, but it's a recent version, probabIy 2003 or 2005. I would like the windows directory tree to mimic the unix tree as closely as possible, but I don't want duplicate files and other inconsistencies. I have come up with an idea but I don't know how close it fits a "typical" windows project. If you know of specific...
4
1983
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi I am familiar with unit testing but have to implement in a large solution of 100 projects - my concern is Adding Unit test will bloat the solution - taking more time to get all code from SVN and slow compile time for developers -Is there a way to build solution in debug without building all the unit tests -Is there a goos way to oragnize the unit test so there are not alot of projects
0
9487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10069
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9735
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6556
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3828
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2697
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.