473,763 Members | 7,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1970
Peter Rilling <pe***@nospam.r illing.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.co m>
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.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com...
Peter Rilling <pe***@nospam.r illing.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.co m>
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.r illing.net> wrote in message
news:Ov******** ******@TK2MSFTN GP12.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.r illing.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.co m>
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.r illing.net> wrote in message
news:Ov******** ******@TK2MSFTN GP12.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.r illing.net> wrote in message
news:Ov******** ******@TK2MSFTN GP12.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
494
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: > nunit-console.exe foo.dll bar.dll Both foo.dll.config and bar.dll.config exists in the same directory. What seems to happen, though, is that only one of the config files is loaded (bar.dll.config), wich causes my nunit tests in foo.dll to...
0
1815
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 console it should be possible to redirect the output to a file using the /out commandline switch, like /out:filename.txt
2
14243
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 following examples that came with NUnit and when I tried to compile Nunit test file here is the error i received: ========================================================================
1
2171
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
1676
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 i"\nunit. does anyone know what the problem here is? any pointers will be appreciated.
6
8379
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 express at home (the labs may have an earlier version). does anyone know how to tell visual studio to use this dll? thanks
20
2024
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. Hence can someone who has used them before share his/her experience on them so that I can get a better idea and make a proper choice ? Any link or suggestions are also welcome. Thanks and Regards, Parag
6
6080
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 Client Name, phone number, email, etc. I want to the NUNIT to read this data from a file. This way I can change the data in a file easily and test various types of test data. I think this can be done using the CONFIG file that NUNIT reads. Is
2
5158
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 (e.g. nunit.util.tests.dll) so the install of NUnit seems OK. I've compiled one of the sample projects (csharp-sample_VS2005). When I do so I get the following warning after a build:
1
3003
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 myCurrentToken = new UsernameToken("xxxx", "YYY", PasswordOption.SendPlainText); MyServicesWse adminServices = new MyServicesWse();
0
9564
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
10148
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
9823
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
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6643
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
5270
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...
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2794
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.