Re: test configurations
"Charlie Poole" <[email protected]> Fri, 12 Sep 2008 11:34:46 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <008401c91506$3f1de280$6401a8c0@ferrari> |
This is a multi-part message in MIME format.
--===============1853794573==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0085_01C914CB.92BF0A80"
This is a multi-part message in MIME format.
------=_NextPart_000_0085_01C914CB.92BF0A80
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi Peter,
If you are only concerned about the console runner and not the gui, it's
simple.
Just list all the assemblies on the command line and nunit will run each of
them
in a separate appdomain, with it's default config file being used.
For the gui, you have to do more work. I'm not currently sitting where I can
experiment with this, but I believe the following will work...
1. Create an NUnit project using the project editor and add all your
assemblies to it.
2. Be sure NOT to change any of the following from their defaults:
BasePath
PrivateBinPath
ConfigurationFile
3. Save the project file, open it in an editor and make sure that there are
no values
for appbase, binpath or configfile - just to be sure.
4. Run your project using a separate domain for each assembly. In the gui,
this
is found under the options dialog. In the console, use /domain:Multiple
on the
command line, or list all the names as described above.
FWIW, the reason this is so complicated is that nunit projects are the only
way
to run multiple assemblies in the gui and they were designed with the idea
of
a common config in mind.
Charlie
_____
From: [email protected]
[mailto:[email protected]] On Behalf Of Peter A.
Kirk
Sent: Friday, September 12, 2008 1:03 AM
To: [email protected]
Subject: [Nunit-users] test configurations
Hi
I have a solution containing many projects, each of which has its own "test
dll" with their own "app.config".
Each test dll can be run as a seperate Nunit test, and uses its own config
file.
Is it possible to create a single "test project" which includes all the
individual test dlls, which when run utilise their individual app.configs?
Thanks,
Peter
------=_NextPart_000_0085_01C914CB.92BF0A80
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.6000.16705" name=3DGENERATOR>
<STYLE>@page Section1 {size: 595.3pt 841.9pt; margin: 3.0cm 2.0cm 3.0cm =
2.0cm; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle18 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle19 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=3DDA vLink=3Dpurple link=3Dblue>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>Hi=20
Peter,</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>If you=20
are only concerned about the console runner and not the gui, it's=20
simple.</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>Just=20
list all the assemblies on the command line and nunit will run each of=20
them</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>in a=20
separate appdomain, with it's default config file being=20
used.</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>For=20
the gui, you have to do more work. </FONT></SPAN><SPAN=20
class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>I'm not currently=20
sitting where I can </FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>experiment with this, but I believe the following =
</FONT></SPAN><SPAN=20
class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>will=20
work...</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>1.=20
Create an NUnit project using the project editor and add all your =
assemblies to=20
it.</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>2. Be=20
sure NOT to change any of the following from their =
defaults:</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2> =
BasePath</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2> =20
PrivateBinPath</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2> =20
ConfigurationFile</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>3.=20
Save the project file, open it in an editor and make sure that there are =
no=20
values</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2> for appbase, binpath or configfile - just to =
be=20
sure.</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>4. Run=20
your project using a separate domain for each assembly. In the gui,=20
this</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2> is found under the options dialog. In the =
console, use=20
/domain:Multiple on the</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2> command line, or list all the names as =
described=20
above.</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>FWIW,=20
the reason this is so complicated is that nunit projects are the only=20
way</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>to run=20
multiple assemblies in the gui and they were designed with the idea=20
of</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>a=20
common config in mind.</FONT></SPAN></DIV>
<DIV><SPAN class=3D265402816-12092008></SPAN> </DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D265402816-12092008><FONT face=3DArial color=3D#0000ff =
size=3D2>Charlie</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B>=20
[email protected]=20
[mailto:[email protected]] <B>On Behalf Of =
</B>Peter=20
A. Kirk<BR><B>Sent:</B> Friday, September 12, 2008 1:03 =
AM<BR><B>To:</B>=20
[email protected]<BR><B>Subject:</B> [Nunit-users] =
test=20
configurations<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">Hi<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have a solution =
containing many=20
projects, each of which has its own ”test dll” with their =
own=20
”app.config”.<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Each test dll can be run =
as a=20
seperate Nunit test, and uses its own config=20
file.<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Is it possible to create =
a single=20
”test project” which includes all the individual test =
dlls, which when run=20
utilise their individual app.configs?<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">Thanks,<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">Peter<o:p></o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML=
>
------=_NextPart_000_0085_01C914CB.92BF0A80--
--===============1853794573==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
--===============1853794573==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users
--===============1853794573==--