source: BMXNET_RPMS_dotNET_UTILITIES-BMX/branch/IHS BMX Framework/lib/NUnit/NUnit-2.5.10.11092/doc/multiAssembly.html@ 1146

Last change on this file since 1146 was 1146, checked in by Sam Habiel, 13 years ago

Initial Import of BMX4

File size: 5.9 KB
Line 
1<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2<html>
3<!-- Standard Head Part -->
4<head>
5<title>NUnit - MultiAssembly</title>
6<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
7<meta http-equiv="Content-Language" content="en-US">
8<link rel="stylesheet" type="text/css" href="nunit.css">
9<link rel="shortcut icon" href="favicon.ico">
10</head>
11<!-- End Standard Head Part -->
12
13<body>
14
15<!-- Standard Header for NUnit.org -->
16<div id="header">
17 <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
18 <div id="nav">
19 <a href="http://www.nunit.org">NUnit</a>
20 <a class="active" href="index.html">Documentation</a>
21 </div>
22</div>
23<!-- End of Header -->
24
25<div id="content">
26
27<h2>Multiple-Assembly Support</h2>
28
29<p>Since version 2.1, NUnit has allowed loading suites of tests from multiple assemblies in both
30the console and GUI runners. This may be done on an adhoc basis or by creating NUnit test projects
31saved as files of type '.nunit'. In either case, a top-level suite is constructed, which contains
32the root suite for each assembly. Tests are run and reported just as for a single assembly.</p>
33
34<h3>Adhoc Usage</h3>
35
36<p>Using the console runner, multiple assemblies may be run simply by specifying their names on the
37command line. See <a href="consoleCommandLine.html">NUnit-Console Command Line Options</a> for
38an example of this usage.</p>
39
40<p>The gui runner does not support specifying multiple assemblies on the command-line.
41However, you can load a single assembly and then use the Project menu to add additional
42assemblies. Additionally, you can drag multiple assemblies to the tree view pane, in which
43case they will replace any assemblies already loaded.</p>
44
45<h3>NUnit Test Projects</h3>
46
47<p>Running tests from multiple assemblies is facilitated by the use of NUnit test projects. These are
48files with the extension .nunit containing information about the assemblies to be loaded. The
49following is an example of a hypothetical test project file:</p>
50
51<div class="code">
52<pre>&lt;NUnitProject&gt;
53 &lt;Settings activeconfig="Debug"/&gt;
54 &lt;Config name="Debug"&gt;
55 &lt;assembly path="LibraryCore\bin\Debug\Library.dll"/&gt;
56 &lt;assembly path="LibraryUI\bin\Debug\LibraryUI.dll"/&gt;
57 &lt;/Config&gt;
58 &lt;Config name="Release"&gt;
59 &lt;assembly path="LibraryCore\bin\Release\Library.dll"/&gt;
60 &lt;assembly path="LibraryUI\bin\Release\LibraryUI.dll"/&gt;
61 &lt;/Config&gt;
62&lt;/NUnitProject&gt;</pre>
63</div>
64
65<p>This project contains two configurations, each of which contains two assemblies. The Debug
66configuration is currently active. By default, the assemblies will be loaded using the directory
67containing this file as the ApplicationBase. The PrivateBinPath will be set automatically to
68<code>LibraryCore\bin\Debug;LibraryUI\bin\Debug</code> or to the corresonding release path.
69XML attributes are used to specify non-default values for the ApplicationBase, Configuration
70File and PrivateBinPath. The <a href="projectEditor.html">Project Editor</a> may
71be used to create or modify NUnit projects.</p>
72
73<p>Even when you are running a single test assembly, NUnit creates an internal project
74to contain that assembly. If you are using the gui, you can save this project, edit it,
75add additional assemblies, etc. Note that the gui does not display the internal project
76unless you add assemblies or modify it in some other way.
77
78<p>If you use <a href="vsSupport.html">Visual Studio Support</a> to load Visual
79Studio .Net project or solution files, NUnit converts them to Test projects internally.
80As with other internal projects, these test projects are not saved automatically but may
81be saved by use of the File menu.</p>
82
83<h3>Loading and Running</h3>
84
85<p>In the past, test writers have been able to rely on the current directory being set to the
86directory containing the single loaded assembly. For the purpose of compatibility, NUnit continues
87to set the current directory to the directory containing each assembly whenever any test from that
88assembly is run.</p>
89
90<p>Additionally, because some assemblies may rely on unmanaged dlls in the same directory, the
91current directory is also set to that of the assembly at the time the assembly is loaded. However,
92in cases where multiple assemblies reference the same unmanaged assembly, this may not be sufficient
93and the user may need to place the directory containing the unmanaged dll on the path.</p>
94
95</div>
96
97<!-- Submenu -->
98<div id="subnav">
99<ul>
100<li><a href="index.html">NUnit 2.5.10</a></li>
101<ul>
102<li><a href="getStarted.html">Getting&nbsp;Started</a></li>
103<li><a href="assertions.html">Assertions</a></li>
104<li><a href="constraintModel.html">Constraints</a></li>
105<li><a href="attributes.html">Attributes</a></li>
106<li><a href="runningTests.html">Running&nbsp;Tests</a></li>
107<ul>
108<li><a href="nunit-console.html">Console&nbsp;Runner</a></li>
109<li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li>
110<li><a href="pnunit.html">PNUnit&nbsp;Runner</a></li>
111<li><a href="nunit-agent.html">NUnit&nbsp;Agent</a></li>
112<li><a href="runtimeSelection.html">Runtime&nbsp;Selection</a></li>
113<li><a href="assemblyIsolation.html">Assembly&nbsp;Isolation</a></li>
114<li><a href="configFiles.html">Configuration&nbsp;Files</a></li>
115<li id="current"><a href="multiAssembly.html">Multiple&nbsp;Assemblies</a></li>
116<li><a href="vsSupport.html">Visual&nbsp;Studio&nbsp;Support</a></li>
117</ul>
118<li><a href="extensibility.html">Extensibility</a></li>
119<li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
120<li><a href="samples.html">Samples</a></li>
121<li><a href="license.html">License</a></li>
122</ul>
123</ul>
124</div>
125<!-- End of Submenu -->
126
127
128<!-- Standard Footer for NUnit.org -->
129<div id="footer">
130 Copyright &copy; 2010 Charlie Poole. All Rights Reserved.
131</div>
132<!-- End of Footer -->
133
134</body>
135</html>
Note: See TracBrowser for help on using the repository browser.