473,378 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to use NUnit in multi-developer environment.

My development team is using VS.NET with VSS integration. They are able to
check in and out from within VS.NET. We also use NUnit for testing our
libraries. Currently our entire solution is checked into VSS along with all
the associated projects. Many developers need to work on the same solution.

The problem that I am having is getting a consistent unit test system setup
so that it can easily be shared. Basically, in order to run unit tests with
NUnit, we have an additional project in the solution that contains just the
test fixtures. Since that is part of the solution, it needs to be uploaded
to VSS. This is also desired since different people may need to add test
cases for their parts of code.

The problem is that I cannot determine a clean way for the developers to
share the test harnesses because the properties for the unit test project
requires absolute paths to the nunit.framework.dll and the nunit-gui.exe, as
well as an absolute path to the assembly that contains the test fixtures.
Since these are absolute, they break when different developers download the
projects. We do not necessarily have the same directory structures and
therefore VS.NET may not always be able to locate the absolute paths.

So, I would like to know how other people have solved this type of problem.
Jul 21 '05 #1
6 1934
Peter Rilling <pe***@nospam.rilling.net> wrote:
My development team is using VS.NET with VSS integration. They are able to
check in and out from within VS.NET. We also use NUnit for testing our
libraries. Currently our entire solution is checked into VSS along with all
the associated projects. Many developers need to work on the same solution.

The problem that I am having is getting a consistent unit test system setup
so that it can easily be shared. Basically, in order to run unit tests with
NUnit, we have an additional project in the solution that contains just the
test fixtures. Since that is part of the solution, it needs to be uploaded
to VSS. This is also desired since different people may need to add test
cases for their parts of code.

The problem is that I cannot determine a clean way for the developers to
share the test harnesses because the properties for the unit test project
requires absolute paths to the nunit.framework.dll and the nunit-gui.exe, as
well as an absolute path to the assembly that contains the test fixtures.

Since these are absolute, they break when different developers download the
projects. We do not necessarily have the same directory structures and
therefore VS.NET may not always be able to locate the absolute paths.

So, I would like to know how other people have solved this type of problem.


Does it matter if each developer has their own unit test project?
They'll still all be testing the same code, just at different
locations. Just don't have the unit test project in VSS. I can't think
that the unit test project would need any settings which you'd want to
have shared, but please correct me if I'm missing something.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
Well, first, the unit tests should be in VSS because they are code and they
should be under SCC just like any other code. That way we can view the
history and be protected in case data is lost on a developers' machine.

Next, our dev leads may want to be able to run the unit tests to verify that
nothing has broken. This is a procedural issue in our organization.

Next, what about developers who work on the same classes and methods. The
reason for having a single unit test environment would be to ensure that any
changes a developer makes did not compromise the code integrity. If each
developer had their own unit test project on their local machine, those
tests would be geared toward the code they worked on and may not take into
account code that was previous implemented. There may be business rules
that are not apparent in methods that changes could break. If all
developers were about to run all unit tests from all other developers, it
would ensure quality code.

Next, some of our projects have their solutions uploaded in VSS. That means
that all developers would have to be working from the same set of projects,
no more, no less. Otherwise the solution would need to be checked out each
time someone wanted to add their own custom projects and then break break
other developers.

Finally, we want to run the unit tests each night during the automated build
process. That means they have to be with the rest of the project so the
Anthill can fetch them.

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Peter Rilling <pe***@nospam.rilling.net> wrote:
My development team is using VS.NET with VSS integration. They are able to check in and out from within VS.NET. We also use NUnit for testing our
libraries. Currently our entire solution is checked into VSS along with all the associated projects. Many developers need to work on the same solution.
The problem that I am having is getting a consistent unit test system setup so that it can easily be shared. Basically, in order to run unit tests with NUnit, we have an additional project in the solution that contains just the test fixtures. Since that is part of the solution, it needs to be uploaded to VSS. This is also desired since different people may need to add test cases for their parts of code.

The problem is that I cannot determine a clean way for the developers to
share the test harnesses because the properties for the unit test project requires absolute paths to the nunit.framework.dll and the nunit-gui.exe, as well as an absolute path to the assembly that contains the test fixtures.
Since these are absolute, they break when different developers download the projects. We do not necessarily have the same directory structures and
therefore VS.NET may not always be able to locate the absolute paths.

So, I would like to know how other people have solved this type of
problem.
Does it matter if each developer has their own unit test project?
They'll still all be testing the same code, just at different
locations. Just don't have the unit test project in VSS. I can't think
that the unit test project would need any settings which you'd want to
have shared, but please correct me if I'm missing something.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #3
Hi Peter,

Have a look at HarnessIt as an alternative to NUnit.

http://www.unittesting.com

HarnessIt uses *relative* paths in its project files so is perfect for
source control. Additionally, it has a developer specific settings file much
like the .csproj.user in Visual Studio for certain settings that needs to be
stored specific to a particular developer and should be outside version
control.

Here's a breif document in our help discussing HarnessIt and source control.
http://www.unittesting.com/documenta...onControl.html

(watch for URL wrapping)

Regards,
Michael

Michael Kennedy
Partner, Software Engineer
United Binary, LLC
http://www.unittesting.com
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Ov**************@TK2MSFTNGP12.phx.gbl...
My development team is using VS.NET with VSS integration. They are able to check in and out from within VS.NET. We also use NUnit for testing our
libraries. Currently our entire solution is checked into VSS along with all the associated projects. Many developers need to work on the same solution.
The problem that I am having is getting a consistent unit test system setup so that it can easily be shared. Basically, in order to run unit tests with NUnit, we have an additional project in the solution that contains just the test fixtures. Since that is part of the solution, it needs to be uploaded to VSS. This is also desired since different people may need to add test
cases for their parts of code.

The problem is that I cannot determine a clean way for the developers to
share the test harnesses because the properties for the unit test project
requires absolute paths to the nunit.framework.dll and the nunit-gui.exe, as well as an absolute path to the assembly that contains the test fixtures.
Since these are absolute, they break when different developers download the projects. We do not necessarily have the same directory structures and
therefore VS.NET may not always be able to locate the absolute paths.

So, I would like to know how other people have solved this type of problem.

Jul 21 '05 #4
Peter Rilling <pe***@nospam.rilling.net> wrote:
Well, first, the unit tests should be in VSS because they are code and they
should be under SCC just like any other code. That way we can view the
history and be protected in case data is lost on a developers' machine.
Yes, and I didn't disagree with that at all.
Next, our dev leads may want to be able to run the unit tests to verify that
nothing has broken. This is a procedural issue in our organization.


Absolutely.

<snip>

I think you've misunderstood my suggestion. The actual unit tests,
fixtures etc should all be in VSS. That doesn't mean everyone's NUnit
*project file* which just defines where things are needs to be in VSS.
You would probably want one version for the build machine in VSS, but
that doesn't mean that needs to be the one that everyone else uses.

All the *code* ends up in VSS - just not the *.nunit project file,
which could contain the absolute references if necessary. (In fact,
having just tried a simple project in v2.1, I'm not sure the references
*need* to be absolute, but that's another matter.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #5
One way to get around these problems in general is creating a virtual drive
(mapping a UNC path, or using subst) that's the same on every dev machine.

-mike
MVP

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Ov**************@TK2MSFTNGP12.phx.gbl...
My development team is using VS.NET with VSS integration. They are able to check in and out from within VS.NET. We also use NUnit for testing our
libraries. Currently our entire solution is checked into VSS along with all the associated projects. Many developers need to work on the same solution.
The problem that I am having is getting a consistent unit test system setup so that it can easily be shared. Basically, in order to run unit tests with NUnit, we have an additional project in the solution that contains just the test fixtures. Since that is part of the solution, it needs to be uploaded to VSS. This is also desired since different people may need to add test
cases for their parts of code.

The problem is that I cannot determine a clean way for the developers to
share the test harnesses because the properties for the unit test project
requires absolute paths to the nunit.framework.dll and the nunit-gui.exe, as well as an absolute path to the assembly that contains the test fixtures.
Since these are absolute, they break when different developers download the projects. We do not necessarily have the same directory structures and
therefore VS.NET may not always be able to locate the absolute paths.

So, I would like to know how other people have solved this type of problem.

Jul 21 '05 #6
In general I find sysinternals junction a great tool for fixing absolute
or fixed in stone path problems

http://www.sysinternals.com/ntw2k/so...shtml#junction
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Ov**************@TK2MSFTNGP12.phx.gbl...
My development team is using VS.NET with VSS integration. They are able to
check in and out from within VS.NET. We also use NUnit for testing our
libraries. Currently our entire solution is checked into VSS along with all
the associated projects. Many developers need to work on the same solution.

The problem that I am having is getting a consistent unit test system setup
so that it can easily be shared. Basically, in order to run unit tests with
NUnit, we have an additional project in the solution that contains just the
test fixtures. Since that is part of the solution, it needs to be uploaded
to VSS. This is also desired since different people may need to add test
cases for their parts of code.

The problem is that I cannot determine a clean way for the developers to
share the test harnesses because the properties for the unit test project
requires absolute paths to the nunit.framework.dll and the nunit-gui.exe, as
well as an absolute path to the assembly that contains the test fixtures.
Since these are absolute, they break when different developers download the
projects. We do not necessarily have the same directory structures and
therefore VS.NET may not always be able to locate the absolute paths.

So, I would like to know how other people have solved this type of problem.

Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Klas Mellbourn | last post by:
I have several assemblies, in separate dll:s, each with nunit tests embedded. Every assembly requires its own config file. I would like to run all nunit tests on the same command line. Like this: ...
0
by: serge desmedt | last post by:
Hi, Where about to start using Unit Testing for dotNet. I have experimented with the NUnit framework and have the following question: According to the documentation of NUnit , using the...
2
by: d2d | last post by:
How are you doing there folks? I just have this newbie question about how to compile an NUnit test file from command line using "csc.exe" I installed NUnit 2.1 using *.msi file. I was...
1
by: Justin D. Fisher | last post by:
Anyone out there use NUnit for unit level testing on VB.Net? I see lots of C# documentation out there but very little for VB.Net? Can anyone suggest some books or web sites that address this?
0
by: Ray Tayek | last post by:
hi, getting a: .\Stdafx.cpp : fatal error C1192: #using failed on 'i: nunit\samples\cpp-sample"' 'The filename, directory name, or volume label syntax is incorrect.' nunit is installed in...
6
by: Ray Tayek | last post by:
hi, i am preparing to teach a class in c++ and would like to intoduce some unit testing. i can make unit tests in c# using this dll and nant from the command line. i am using visual c++ 2005...
20
by: Parag | last post by:
Hi, I am trying to figure out best testing tool for my project. I have narrowed down my requirements to two tools NUNIT and VSTS unit. But I have used neither and I have to use only one of them....
6
by: tchaiket | last post by:
Hey all, I'm using NUNIT to test our classes. However, I don't want to hard code test data into the NUNIT classes. For example, to test adding a new Client, I don't want to hard code the...
2
by: JohnGoogle | last post by:
Hi, I'm a newbie so sorry if there is a simple answer to this! I'm using C# in Visual Studio Express at the moment. I've downloaded NUnit v 2.2.8 and can load and run the tests they supply...
1
by: nyathancha | last post by:
Hi, I am using WSE to implement security using x509 certificates. This works when I use a windows client but throws an exception when I use NUnit. My Code looks as follows : UsernameToken...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.