HighTechTalks DotNet Forums  

Unit Tests: Too many Projects in a Solution?

Visual Studio.net (Enterprise Tools) microsoft.public.vsnet.enterprise.tools


Discuss Unit Tests: Too many Projects in a Solution? in the Visual Studio.net (Enterprise Tools) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
geogruven
 
Posts: n/a

Default Unit Tests: Too many Projects in a Solution? - 11-01-2007 , 04:28 PM






I wonder if anyone has run into this yet.

Say you have a solution with 18 projects in it.

Do you create a Test Project for each of the original 18 application
projects and end up with 36 projects in the solution?

Is that too many Projects in a Solution cluttering up the Solution Explorer?

Are they any other strategies possible?

Reply With Quote
  #2  
Old   
Bryan Phillips
 
Posts: n/a

Default Re: Unit Tests: Too many Projects in a Solution? - 11-06-2007 , 12:38 PM






This has been a problem in VS2003 and VS2005 due to different factors.
What errors are you getting?

--


Bryan Phillips
MCT, MCSD, MCDBA, MCSE
Microsoft MVP - Client Application Development
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net



"geogruven" <geogruven (AT) discussions (DOT) microsoft.com> wrote


Quote:
I wonder if anyone has run into this yet.

Say you have a solution with 18 projects in it.

Do you create a Test Project for each of the original 18 application
projects and end up with 36 projects in the solution?

Is that too many Projects in a Solution cluttering up the Solution Explorer?

Are they any other strategies possible?


Reply With Quote
  #3  
Old   
geogruven
 
Posts: n/a

Default Re: Unit Tests: Too many Projects in a Solution? - 11-06-2007 , 04:12 PM



Not getting any errors... was looking for a voice of experience.

Am using VS.NET 2005 with built-in Testing Tools. (Developer Version)

In trying to sell Unit Testing on my current project, one of the engineers
on the team pointed out that with 18 projects already in the solution, adding
testing projects will inflate the solution with potentially another 18
projects if we use a one to one mappings of Unit Test Project to Test Target
Project.

Of course, when you create new unit tests, you can choose where to create
them. The choices include existing projects as well as new projects. So, we
can organize all the Unit Tests into one project if desired, but that seems
cumbersome.

Seems to me that the tool works fine with lots of flexibility with where you
add unit tests however, I thought I'd check with the community for
suggestions as to a best practice when adding Unit Tests to Solutions that
already have a lot of projects.

"Bryan Phillips" wrote:

Quote:
This has been a problem in VS2003 and VS2005 due to different factors.
What errors are you getting?

--


Bryan Phillips
MCT, MCSD, MCDBA, MCSE
Microsoft MVP - Client Application Development
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net



"geogruven" <geogruven (AT) discussions (DOT) microsoft.com> wrote in message
news:20D9F947-8488-487A-AC3D-711682C42909 (AT) microsoft (DOT) com:

I wonder if anyone has run into this yet.

Say you have a solution with 18 projects in it.

Do you create a Test Project for each of the original 18 application
projects and end up with 36 projects in the solution?

Is that too many Projects in a Solution cluttering up the Solution Explorer?

Are they any other strategies possible?



Reply With Quote
  #4  
Old   
Bryan Phillips
 
Posts: n/a

Default Re: Unit Tests: Too many Projects in a Solution? - 11-10-2007 , 09:44 PM



The main problem with many projects in a single solution has been the
Intellisense engine locking the compiled assemblies so that subsequent
builds fail because the .Net compilers cannot write to the locked DLLs.
The problem first occurred in VS2003 and to a lesser extent on VS2005.
I have not seen this occur on VS2008 yet which I have been using for
more than 6 months.

--
Bryan Phillips
MCT, MCSD, MCDBA, MCSE
Microsoft MVP - Client Application Development
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net



"geogruven" <geogruven (AT) discussions (DOT) microsoft.com> wrote


Quote:
Not getting any errors... was looking for a voice of experience.

Am using VS.NET 2005 with built-in Testing Tools. (Developer Version)

In trying to sell Unit Testing on my current project, one of the engineers
on the team pointed out that with 18 projects already in the solution, adding
testing projects will inflate the solution with potentially another 18
projects if we use a one to one mappings of Unit Test Project to Test Target
Project.

Of course, when you create new unit tests, you can choose where to create
them. The choices include existing projects as well as new projects. So, we
can organize all the Unit Tests into one project if desired, but that seems
cumbersome.

Seems to me that the tool works fine with lots of flexibility with where you
add unit tests however, I thought I'd check with the community for
suggestions as to a best practice when adding Unit Tests to Solutions that
already have a lot of projects.

"Bryan Phillips" wrote:

This has been a problem in VS2003 and VS2005 due to different factors.
What errors are you getting?

--


Bryan Phillips
MCT, MCSD, MCDBA, MCSE
Microsoft MVP - Client Application Development
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net



"geogruven" <geogruven (AT) discussions (DOT) microsoft.com> wrote in message
news:20D9F947-8488-487A-AC3D-711682C42909 (AT) microsoft (DOT) com:

I wonder if anyone has run into this yet.

Say you have a solution with 18 projects in it.

Do you create a Test Project for each of the original 18 application
projects and end up with 36 projects in the solution?

Is that too many Projects in a Solution cluttering up the Solution Explorer?

Are they any other strategies possible?




Reply With Quote
  #5  
Old   
steveu
 
Posts: n/a

Default Re: Unit Tests: Too many Projects in a Solution? - 01-02-2008 , 05:02 AM



I'd like to add to this post by asking a further question...

We have a very large solution (over 170 projects) which is just too big to
manage properly. Therefore my team has created a smaller solution that
contains only the subset of the projects that are relevant to our day to day
work - including unit testing.

However, even the smaller solution has plenty of projects in it (40 - C++
mostly). 5 of these are unit test projects which now contain in excess of 200
unit tests. The problem we're having now is that it takes an age for the Test
View to refresh. It seems that when you refresh (or load the view for the
first time) the IDE (Intellisense I think) scans the entire solution for unit
test code. Is there any way to optimise this so that it doesn't have to
rescan the entire solution when we need to refresh the Test View?

I really need a solution to this as my team is piloting Unit Testing before
rolling it out to the rest of the development group as a whole. If we can't
find a way to make the Unit Testing scale better then I can only see that
we're going to have to find an alternative. We're using VS2005 by the way -
does anyone know if the situation is any better in VS2008?

Possible solutions we're considering:
1) Removing even more projects so that we have a "test" solution that only
contains the projects under test and their associate test projets. (But even
that will eventually get big again).
2) Moving to NUnit - or perhaps TestDriven.Net?

Thanks.


"Bryan Phillips" wrote:

Quote:
The main problem with many projects in a single solution has been the
Intellisense engine locking the compiled assemblies so that subsequent
builds fail because the .Net compilers cannot write to the locked DLLs.
The problem first occurred in VS2003 and to a lesser extent on VS2005.
I have not seen this occur on VS2008 yet which I have been using for
more than 6 months.

--
Bryan Phillips
MCT, MCSD, MCDBA, MCSE
Microsoft MVP - Client Application Development
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net



"geogruven" <geogruven (AT) discussions (DOT) microsoft.com> wrote in message
news:0F973E84-A31C-461C-9371-42949DF1E4A7 (AT) microsoft (DOT) com:

Not getting any errors... was looking for a voice of experience.

Am using VS.NET 2005 with built-in Testing Tools. (Developer Version)

In trying to sell Unit Testing on my current project, one of the engineers
on the team pointed out that with 18 projects already in the solution, adding
testing projects will inflate the solution with potentially another 18
projects if we use a one to one mappings of Unit Test Project to Test Target
Project.

Of course, when you create new unit tests, you can choose where to create
them. The choices include existing projects as well as new projects. So, we
can organize all the Unit Tests into one project if desired, but that seems
cumbersome.

Seems to me that the tool works fine with lots of flexibility with where you
add unit tests however, I thought I'd check with the community for
suggestions as to a best practice when adding Unit Tests to Solutions that
already have a lot of projects.

"Bryan Phillips" wrote:

This has been a problem in VS2003 and VS2005 due to different factors.
What errors are you getting?

--


Bryan Phillips
MCT, MCSD, MCDBA, MCSE
Microsoft MVP - Client Application Development
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net



"geogruven" <geogruven (AT) discussions (DOT) microsoft.com> wrote in message
news:20D9F947-8488-487A-AC3D-711682C42909 (AT) microsoft (DOT) com:

I wonder if anyone has run into this yet.

Say you have a solution with 18 projects in it.

Do you create a Test Project for each of the original 18 application
projects and end up with 36 projects in the solution?

Is that too many Projects in a Solution cluttering up the Solution Explorer?

Are they any other strategies possible?





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.