nunit 2.4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/docs/addinsDialog.html +74 -0
- data/docs/assertions.html +91 -0
- data/docs/attributes.html +89 -0
- data/docs/category.html +265 -0
- data/docs/classicModel.html +92 -0
- data/docs/codeFuncs.js +77 -0
- data/docs/collectionAssert.html +162 -0
- data/docs/collectionConstraints.html +130 -0
- data/docs/comparisonAsserts.html +271 -0
- data/docs/comparisonConstraints.html +109 -0
- data/docs/compoundConstraints.html +97 -0
- data/docs/conditionAsserts.html +123 -0
- data/docs/conditionConstraints.html +106 -0
- data/docs/configEditor.html +93 -0
- data/docs/configFiles.html +155 -0
- data/docs/consoleCommandLine.html +271 -0
- data/docs/constraintModel.html +134 -0
- data/docs/contextMenu.html +106 -0
- data/docs/culture.html +255 -0
- data/docs/customAsserts.html +115 -0
- data/docs/customConstraints.html +101 -0
- data/docs/description.html +178 -0
- data/docs/equalConstraint.html +139 -0
- data/docs/equalityAsserts.html +187 -0
- data/docs/exception.html +296 -0
- data/docs/explicit.html +256 -0
- data/docs/extensibility.html +83 -0
- data/docs/favicon.ico +0 -0
- data/docs/features.html +75 -0
- data/docs/fileAssert.html +114 -0
- data/docs/files/QuickStart.Spanish.doc +0 -0
- data/docs/files/QuickStart.doc +0 -0
- data/docs/files/Results.xsd +70 -0
- data/docs/files/Summary.xslt +47 -0
- data/docs/files/TestResult.xml +103 -0
- data/docs/files/Thumbs.db +0 -0
- data/docs/fixtureSetup.html +201 -0
- data/docs/fixtureTeardown.html +204 -0
- data/docs/getStarted.html +80 -0
- data/docs/guiCommandLine.html +183 -0
- data/docs/identityAsserts.html +99 -0
- data/docs/ignore.html +249 -0
- data/docs/img/addinsDialog.JPG +0 -0
- data/docs/img/assembliesTab.jpg +0 -0
- data/docs/img/assemblyReloadOptions.JPG +0 -0
- data/docs/img/bulletOff.gif +0 -0
- data/docs/img/bulletOn.gif +0 -0
- data/docs/img/configEditor.jpg +0 -0
- data/docs/img/console-mock.jpg +0 -0
- data/docs/img/displayTab.jpg +0 -0
- data/docs/img/generalOptions.jpg +0 -0
- data/docs/img/generalTab.jpg +0 -0
- data/docs/img/gui-screenshot.jpg +0 -0
- data/docs/img/gui-verify.jpg +0 -0
- data/docs/img/langFilter.gif +0 -0
- data/docs/img/logo.gif +0 -0
- data/docs/img/miniGui.jpg +0 -0
- data/docs/img/optionsDialog.jpg +0 -0
- data/docs/img/resultTab.jpg +0 -0
- data/docs/img/testLoadOptions.jpg +0 -0
- data/docs/img/testOutputOptions.jpg +0 -0
- data/docs/img/testProperties.jpg +0 -0
- data/docs/img/testResultOptions.JPG +0 -0
- data/docs/img/testTab.jpg +0 -0
- data/docs/img/testsTab.JPG +0 -0
- data/docs/img/textOutputOptions.jpg +0 -0
- data/docs/img/treeDisplayOptions.JPG +0 -0
- data/docs/img/visualStudioOptions.JPG +0 -0
- data/docs/index.html +75 -0
- data/docs/installation.html +172 -0
- data/docs/license.html +88 -0
- data/docs/listMapper.html +100 -0
- data/docs/mainMenu.html +260 -0
- data/docs/multiAssembly.html +130 -0
- data/docs/nunit-console.html +84 -0
- data/docs/nunit-gui.html +115 -0
- data/docs/nunit.css +118 -0
- data/docs/nunitAddins.html +331 -0
- data/docs/optionsDialog.html +262 -0
- data/docs/platform.html +285 -0
- data/docs/platformSupport.html +99 -0
- data/docs/projectEditor.html +127 -0
- data/docs/property.html +219 -0
- data/docs/propertyConstraint.html +89 -0
- data/docs/quickStart.html +314 -0
- data/docs/releaseNotes.html +1235 -0
- data/docs/sameasConstraint.html +98 -0
- data/docs/samples.html +126 -0
- data/docs/setCulture.html +173 -0
- data/docs/setup.html +199 -0
- data/docs/setupFixture.html +198 -0
- data/docs/stringAssert.html +107 -0
- data/docs/stringConstraints.html +111 -0
- data/docs/suite.html +222 -0
- data/docs/teardown.html +204 -0
- data/docs/test.html +171 -0
- data/docs/testFixture.html +168 -0
- data/docs/testProperties.html +76 -0
- data/docs/typeAsserts.html +101 -0
- data/docs/typeConstraints.html +103 -0
- data/docs/upgrade.html +97 -0
- data/docs/utilityAsserts.html +108 -0
- data/docs/vsSupport.html +140 -0
- data/lib/net-1.1/Failure.jpg +0 -0
- data/lib/net-1.1/Ignored.jpg +0 -0
- data/lib/net-1.1/NUnitFitTests.html +277 -0
- data/lib/net-1.1/NUnitTests.config +84 -0
- data/lib/net-1.1/NUnitTests.nunit +14 -0
- data/lib/net-1.1/Success.jpg +0 -0
- data/lib/net-1.1/clr.bat +96 -0
- data/lib/net-1.1/fit.dll +0 -0
- data/lib/net-1.1/loadtest-assembly.dll +0 -0
- data/lib/net-1.1/mock-assembly.dll +0 -0
- data/lib/net-1.1/nonamespace-assembly.dll +0 -0
- data/lib/net-1.1/notestfixtures-assembly.dll +0 -0
- data/lib/net-1.1/nunit-console-runner.dll +0 -0
- data/lib/net-1.1/nunit-console.exe +0 -0
- data/lib/net-1.1/nunit-console.exe.config +117 -0
- data/lib/net-1.1/nunit-console.tests.dll +0 -0
- data/lib/net-1.1/nunit-gui-runner.dll +0 -0
- data/lib/net-1.1/nunit-gui.tests.dll +0 -0
- data/lib/net-1.1/nunit.core.dll +0 -0
- data/lib/net-1.1/nunit.core.extensions.dll +0 -0
- data/lib/net-1.1/nunit.core.interfaces.dll +0 -0
- data/lib/net-1.1/nunit.core.tests.dll +0 -0
- data/lib/net-1.1/nunit.exe +0 -0
- data/lib/net-1.1/nunit.exe.config +121 -0
- data/lib/net-1.1/nunit.extensions.tests.dll +0 -0
- data/lib/net-1.1/nunit.fixtures.dll +0 -0
- data/lib/net-1.1/nunit.fixtures.tests.dll +0 -0
- data/lib/net-1.1/nunit.framework.dll +0 -0
- data/lib/net-1.1/nunit.framework.extensions.dll +0 -0
- data/lib/net-1.1/nunit.framework.tests.dll +0 -0
- data/lib/net-1.1/nunit.framework.xml +5622 -0
- data/lib/net-1.1/nunit.mocks.dll +0 -0
- data/lib/net-1.1/nunit.mocks.tests.dll +0 -0
- data/lib/net-1.1/nunit.uikit.dll +0 -0
- data/lib/net-1.1/nunit.uikit.tests.dll +0 -0
- data/lib/net-1.1/nunit.util.dll +0 -0
- data/lib/net-1.1/nunit.util.tests.dll +0 -0
- data/lib/net-1.1/runFile.exe +0 -0
- data/lib/net-1.1/runFile.exe.config +43 -0
- data/lib/net-1.1/test-assembly.dll +0 -0
- data/lib/net-1.1/test-utilities.dll +0 -0
- data/lib/net-1.1/timing-tests.dll +0 -0
- data/lib/net-2.0/Failure.jpg +0 -0
- data/lib/net-2.0/Ignored.jpg +0 -0
- data/lib/net-2.0/NUnitFitTests.html +277 -0
- data/lib/net-2.0/NUnitTests.config +84 -0
- data/lib/net-2.0/NUnitTests.nunit +14 -0
- data/lib/net-2.0/Success.jpg +0 -0
- data/lib/net-2.0/clr.bat +96 -0
- data/lib/net-2.0/fit.dll +0 -0
- data/lib/net-2.0/loadtest-assembly.dll +0 -0
- data/lib/net-2.0/mock-assembly.dll +0 -0
- data/lib/net-2.0/nonamespace-assembly.dll +0 -0
- data/lib/net-2.0/notestfixtures-assembly.dll +0 -0
- data/lib/net-2.0/nunit-console-runner.dll +0 -0
- data/lib/net-2.0/nunit-console-x86.exe +0 -0
- data/lib/net-2.0/nunit-console-x86.exe.config +117 -0
- data/lib/net-2.0/nunit-console.exe +0 -0
- data/lib/net-2.0/nunit-console.exe.config +117 -0
- data/lib/net-2.0/nunit-console.tests.dll +0 -0
- data/lib/net-2.0/nunit-gui-runner.dll +0 -0
- data/lib/net-2.0/nunit-gui.tests.dll +0 -0
- data/lib/net-2.0/nunit-x86.exe +0 -0
- data/lib/net-2.0/nunit-x86.exe.config +121 -0
- data/lib/net-2.0/nunit.core.dll +0 -0
- data/lib/net-2.0/nunit.core.extensions.dll +0 -0
- data/lib/net-2.0/nunit.core.interfaces.dll +0 -0
- data/lib/net-2.0/nunit.core.tests.dll +0 -0
- data/lib/net-2.0/nunit.exe +0 -0
- data/lib/net-2.0/nunit.exe.config +121 -0
- data/lib/net-2.0/nunit.extensions.tests.dll +0 -0
- data/lib/net-2.0/nunit.fixtures.dll +0 -0
- data/lib/net-2.0/nunit.fixtures.tests.dll +0 -0
- data/lib/net-2.0/nunit.framework.dll +0 -0
- data/lib/net-2.0/nunit.framework.extensions.dll +0 -0
- data/lib/net-2.0/nunit.framework.tests.dll +0 -0
- data/lib/net-2.0/nunit.framework.xml +5622 -0
- data/lib/net-2.0/nunit.mocks.dll +0 -0
- data/lib/net-2.0/nunit.mocks.tests.dll +0 -0
- data/lib/net-2.0/nunit.uikit.dll +0 -0
- data/lib/net-2.0/nunit.uikit.tests.dll +0 -0
- data/lib/net-2.0/nunit.util.dll +0 -0
- data/lib/net-2.0/nunit.util.tests.dll +0 -0
- data/lib/net-2.0/runFile.exe +0 -0
- data/lib/net-2.0/runFile.exe.config +43 -0
- data/lib/net-2.0/test-assembly.dll +0 -0
- data/lib/net-2.0/test-utilities.dll +0 -0
- data/lib/net-2.0/timing-tests.dll +0 -0
- metadata +262 -0
@@ -0,0 +1,271 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - ConsoleCommandLine</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>NUnit-Console Command Line Options</h2>
|
28
|
+
<p>The console interface has a few additional options compared to the forms
|
29
|
+
interface. The command line must always specify one or more file names. The
|
30
|
+
console interface always creates an XML representation of the test results.
|
31
|
+
This file by default is called TestResult.xml and is placed in the working
|
32
|
+
directory.</p>
|
33
|
+
<p><b>Note:</b> By default the nunit-console program is not added to your path. You
|
34
|
+
must do this manually if this is the desired behavior.</p>
|
35
|
+
<p><b>Note:</b> Under the Windows operating system, options may be prefixed by either
|
36
|
+
a forward slash or a hyphen. Under Linux, a hyphen must be used. Options that
|
37
|
+
take values may use an equal sign, a colon or a space to separate the option
|
38
|
+
from its value.</p>
|
39
|
+
<h4>Specifying an Assembly</h4>
|
40
|
+
The console program must always have an assembly or project specified. To run
|
41
|
+
the tests contained in the nunit.tests.dll use the following command:
|
42
|
+
<pre class="programtext"> nunit-console nunit.tests.dll</pre>
|
43
|
+
</p>
|
44
|
+
<p>To run the tests in nunit.tests.dll through the Visual Studio project, use:
|
45
|
+
<pre class="programtext"> nunit-console nunit.tests.csproj</pre>
|
46
|
+
</p>
|
47
|
+
<p>To run the same tests through an NUnit test project you have defined, use:
|
48
|
+
<pre class="programtext"> nunit-console nunit.tests.nunit</pre>
|
49
|
+
</p>
|
50
|
+
<h4>Specifying an Assembly and a Test to be Run</h4>
|
51
|
+
<p>You may specify a test to be run by proviig the full name of the test along
|
52
|
+
with the containing assembly. For example to run NUnit.Tests.AssertionTests
|
53
|
+
in the nunit.tests assembly use the following command:
|
54
|
+
<pre class="programtext"> nunit-console /run:NUnit.Tests.AssertionTests nunit.tests.dll</pre>
|
55
|
+
|
56
|
+
<p>The name of the test to be run may be that of a test case, test fixture or
|
57
|
+
a namespace. Unlike the <b>/fixture</b> option, this option affects the running
|
58
|
+
rather than the loading of the tests. Consequently it supports much broader use,
|
59
|
+
including situations involving SetUpFixtures, which are not run if the class
|
60
|
+
in question is not loaded. You should use <b>/run</b> in lieu of <b>/fixture</b>
|
61
|
+
in most cases.
|
62
|
+
|
63
|
+
<h4>Specifying an Assembly and a Fixture to be Loaded</h4>
|
64
|
+
<p>When specifying a fixture, you must give the full name of the test fixture
|
65
|
+
along with the containing assembly. For example, to load the
|
66
|
+
NUnit.Tests.AssertionTests in the nunit.tests.dll assembly use the following
|
67
|
+
command:
|
68
|
+
<pre class="programtext"> nunit-console /fixture:NUnit.Tests.AssertionTests nunit.tests.dll</pre>
|
69
|
+
</p>
|
70
|
+
<p>The name specified after the <b>/fixture</b> option may be that of a TestFixture
|
71
|
+
class, a legacy suite (using the Suite property ) or a namespace. If a
|
72
|
+
namespace is given, then all fixtures under that namespace are loaded.</p>
|
73
|
+
<p>This option is provided for backward compatibility. In most cases, you will
|
74
|
+
be better served by using the <b>/run</b> option.
|
75
|
+
|
76
|
+
<h4>Specifying the Version of the CLR</h4>
|
77
|
+
|
78
|
+
<p>Most applications are written to run under a specific version of the CLR.
|
79
|
+
A few are designed to operate correctly under multiple versions. In either case,
|
80
|
+
it is important to be able to specify the CLR version to be used for testing.</p>
|
81
|
+
|
82
|
+
<p>When only one version of the CLR is used, the config files for nunit-gui and
|
83
|
+
nunit-console may be set up to specify that version. As a more convenient
|
84
|
+
alternative when switching CLRs, you may use the provided <b>clr.bat</b>
|
85
|
+
command to specify the version under which NUnit should run.</p>
|
86
|
+
|
87
|
+
<p>For example, to run the tests in nunit.tests.dll under the RTM version of
|
88
|
+
the .Net 2.0 framework, use:</p>
|
89
|
+
|
90
|
+
<pre class="programtext"> clr net-2.0 nunit-console nunit.tests.dll</pre>
|
91
|
+
|
92
|
+
<p>The <b>clr.bat</b> file is located in the NUnit <b>bin</b> directory. You may
|
93
|
+
put this on your path, or copy it to a convenient location. Enter <b>clr /?</b>
|
94
|
+
for a list of options.</p>
|
95
|
+
|
96
|
+
<p><b>Note:</b> If you use a <startup> section in the config file, it takes
|
97
|
+
precedence over this option.</p>
|
98
|
+
|
99
|
+
<p><b>Note:</b> This command is specific to the Microsoft .Net
|
100
|
+
framework. The Mono framework provides other means to specify the version
|
101
|
+
to be used when running a command.</p>
|
102
|
+
|
103
|
+
<h4>Specifying Test Categories to Include or Exclude</h4>
|
104
|
+
<p>NUnit provides CategoryAttribute for use in marking tests as belonging to
|
105
|
+
one or more categories. Categories may be included or excluded in a test run
|
106
|
+
using the <b>/include</b> and <b>/exclude</b> options. The following command
|
107
|
+
runs only the tests in the BaseLine category:
|
108
|
+
<pre class="programtext"> nunit-console myassembly.dll /include:BaseLine</pre>
|
109
|
+
</p>
|
110
|
+
<p>The following command runs all tests <b>except</b> those in the Database
|
111
|
+
category:
|
112
|
+
<pre class="programtext"> nunit-console myassembly.dll /exclude:Database</pre>
|
113
|
+
</p>
|
114
|
+
<p>
|
115
|
+
Multiple categories may be specified on either option, by using commas to
|
116
|
+
separate them.
|
117
|
+
<p><b>Notes:</b> Beginning with NUnit 2.4, the /include and /exclude options may
|
118
|
+
be combined on the command line. When both are used, all tests with the included
|
119
|
+
categories are run except for those with the excluded categories.</p>
|
120
|
+
|
121
|
+
<p>Beginning with NUnit 2.4.6, you may use a <b>Category Expression</b> with either
|
122
|
+
of these options:
|
123
|
+
<dl>
|
124
|
+
<dt>A|B|C
|
125
|
+
<dd>Selects tests having any of the categories A, B or C.
|
126
|
+
<dt>A,B,C
|
127
|
+
<dd>Selects tests having any of the categories A, B or C.
|
128
|
+
<dt>A+B+C
|
129
|
+
<dd>Selects only tests having all three of the categories assigned
|
130
|
+
<dt>A+B|C
|
131
|
+
<dd>Selects tests with both A and B OR with category C.
|
132
|
+
<dt>A+B-C
|
133
|
+
<dd>Selects tests with both A and B but not C.
|
134
|
+
<dt>-A
|
135
|
+
<dd>Selects tests not having category A assigned
|
136
|
+
<dt>A+(B|C)
|
137
|
+
<dd>Selects tests having both category A and either of B or C
|
138
|
+
</dl>
|
139
|
+
<p>The comma operator is equivalent to | but has a higher precendence. Order
|
140
|
+
of evaluation is as follows:
|
141
|
+
<ol>
|
142
|
+
<li>Unary exclusion operator (-)
|
143
|
+
<li>High-precendence union operator (,)
|
144
|
+
<li>Intersection and set subtraction operators (+ and binary -)
|
145
|
+
<li>Low-precedence union operator (|)
|
146
|
+
</ol>
|
147
|
+
|
148
|
+
|
149
|
+
<p>For a clear understanding of how category
|
150
|
+
selection works, review the documentation for both the
|
151
|
+
<a href="category.html">Category Attribute</a> and the
|
152
|
+
<a href="explicit.html">Explicit Attribute</a>.</p>
|
153
|
+
<h4>Redirecting Output</h4>
|
154
|
+
<p>The output that is normally shown on the console may be redirected to a file.
|
155
|
+
This includes output created by the test program as well as what NUnit itself
|
156
|
+
creates. The following command redirects standard output to the TestResult.txt
|
157
|
+
file:
|
158
|
+
<pre class="programtext"> nunit-console nunit.tests.dll /out:TestResult.txt</pre>
|
159
|
+
</p>
|
160
|
+
<p>The following command redirects standard error output to the StdErr.txt file.
|
161
|
+
<pre class="programtext"> nunit-console nunit.tests.dll /err:StdErr.txt</pre>
|
162
|
+
</p>
|
163
|
+
<h4>Labeling Test Output</h4>
|
164
|
+
<p>The output from each test normally follows right after that of the preceding
|
165
|
+
test. You may use the <b>/labels</b> option to cause an identifying label to be
|
166
|
+
displayed at the start of each test case.</p>
|
167
|
+
<h4>Specifying the XML file name</h4>
|
168
|
+
<p>As stated above, the console program always creates an XML representation of the
|
169
|
+
test results. To change the name of the output file to
|
170
|
+
"console-test.xml" use the following command line option:
|
171
|
+
<pre class="programtext"> nunit-console /xml:console-test.xml nunit.tests.dll</pre>
|
172
|
+
</p>
|
173
|
+
<h4>Specifying the Transform file</h4>
|
174
|
+
<p>The console interface uses XSLT to transform the test results from the XML file
|
175
|
+
to what is printed to the screen when the program executes. The console
|
176
|
+
interface has a default transformation that is part of the executable. To
|
177
|
+
specify your own transformation named "myTransform.xslt" use the
|
178
|
+
following command line option:
|
179
|
+
<pre class="programtext"> nunit-console /transform:myTransform.xslt nunit.tests.dll</pre>
|
180
|
+
</p>
|
181
|
+
<p><b>Note:</b> For additional information see the XML schema for the test results.
|
182
|
+
This file is in the same directory as the executable and is called
|
183
|
+
<a href="files/Results.xsd">Results.xsd</a>.
|
184
|
+
The default transform <a href="files/Summary.xslt">Summary.xslt</a> is located in the core source directory.</p>
|
185
|
+
<h4>Specifying which Configuration to run</h4>
|
186
|
+
<p>When running tests from a Visual Studio or NUnit project, the first
|
187
|
+
configuration found will be loaded by default. Usually this is Debug. The
|
188
|
+
configuration loaded may be controlled by using the <b>/config</b> switch. The
|
189
|
+
following will load and run tests for the Release configuration of
|
190
|
+
nunit.tests.dll.
|
191
|
+
<pre class="programtext"> nunit-console nunit.tests.csproj /config:Release</pre>
|
192
|
+
</p>
|
193
|
+
<p><b>Note:</b> This option has no effect when loading an assembly directly.</p>
|
194
|
+
<h4>Specifying Multiple Assemblies</h4>
|
195
|
+
<p>You may run tests from multiple assemblies in one run using the console
|
196
|
+
interface even if you have not defined an NUnit test project file. The
|
197
|
+
following command would run a suite of tests contained in assembly1.dll,
|
198
|
+
assembly2.dll and assembly3.dll.
|
199
|
+
<pre class="programtext"> nunit-console assembly1.dll assembly2.dll assembly3.dll</pre>
|
200
|
+
</p>
|
201
|
+
<p><b>Notes:</b> You may specify multiple assemblies, but not multiple NUnit or
|
202
|
+
Visual Studio projects on the command line. Further, you may not specify an
|
203
|
+
NUnit or Visual Studio project together with a list of assemblies.</p>
|
204
|
+
<p>Beginning with NUnit 2.4, the console loads multiple assemblies specified
|
205
|
+
in this way into separate AppDomains by default. You may provide a separate
|
206
|
+
config file for each assembly. You may override the default by use of the
|
207
|
+
<b>/domain</b> option.
|
208
|
+
<p>Beginning with NUnit 2.4, the <b>/fixture</b>
|
209
|
+
option, when used with multiple assemblies, will run tests matching the
|
210
|
+
fixture name in all the assemblies. In earlier versions, only the first
|
211
|
+
test found was executed.</p>
|
212
|
+
<h4>Controlling the Use of AppDomains</h4>
|
213
|
+
<p>The <b>/domain</b> option controls of the creation of AppDomains for running tests.
|
214
|
+
The following values are recognized:</p>
|
215
|
+
<dl style="margin-left: 2em">
|
216
|
+
<dt><b>None</b>
|
217
|
+
<dd>No domain is created - the tests are run in the primary domain. This normally
|
218
|
+
requires copying the <b>NUnit</b> assemblies into the same directory as your tests.
|
219
|
+
<dt><b>Single</b>
|
220
|
+
<dd>A test domain is created - this is how NUnit worked prior to version 2.4
|
221
|
+
<dt><b>Multiple</b>
|
222
|
+
<dd>A separate test domain is created for each assembly
|
223
|
+
</dl>
|
224
|
+
<p>The default is to use multiple domains if multiple assemblies are listed on
|
225
|
+
the command line. Otherwise a single domain is used.</p>
|
226
|
+
<h4>Other Options</h4>
|
227
|
+
<p>The <b>/noshadow</b> option disables shadow copying of the assembly in order to
|
228
|
+
provide improved performance.</p>
|
229
|
+
<p>The <b>/nothread</b> option suppresses use of a separate thread for running the
|
230
|
+
tests and uses the main thread instead.</p>
|
231
|
+
<p>The <b>/wait</b> option causes the program to wait for user input before
|
232
|
+
exiting. This is useful when running nunit-console from a shortcut.</p>
|
233
|
+
<p>The <b>/xmlconsole</b> option displays raw XML output on the console rather than
|
234
|
+
transforming it. This is useful when debugging problems with the XML format.</p>
|
235
|
+
<p>The <b>/nologo</b> option disables display of the copyright information at the
|
236
|
+
start of the program.</p>
|
237
|
+
<p>The <b>/help</b> or <b>/?</b> option displays a brief help message</p>
|
238
|
+
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<!-- Submenu -->
|
242
|
+
<div id="subnav">
|
243
|
+
<ul>
|
244
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
245
|
+
<ul>
|
246
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
247
|
+
<li><a href="assertions.html">Assertions</a></li>
|
248
|
+
<li><a href="attributes.html">Attributes</a></li>
|
249
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
250
|
+
<ul>
|
251
|
+
<li id="current"><a href="consoleCommandLine.html">Command-Line</a></li>
|
252
|
+
</ul>
|
253
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
254
|
+
<li><a href="features.html">Other Features</a></li>
|
255
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
256
|
+
<li><a href="samples.html">Samples</a></li>
|
257
|
+
<li><a href="license.html">License</a></li>
|
258
|
+
</ul>
|
259
|
+
</ul>
|
260
|
+
</div>
|
261
|
+
<!-- End of Submenu -->
|
262
|
+
|
263
|
+
|
264
|
+
<!-- Standard Footer for NUnit.org -->
|
265
|
+
<div id="footer">
|
266
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
267
|
+
</div>
|
268
|
+
<!-- End of Footer -->
|
269
|
+
|
270
|
+
</body>
|
271
|
+
</html>
|
@@ -0,0 +1,134 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - ConstraintModel</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>Constraint-Based Assert Model (NUnit 2.4)</h2>
|
28
|
+
|
29
|
+
<p>The constraint-based Assert model uses a single method of the Assert class
|
30
|
+
for all assertions. The logic necessary to carry out each assertion is
|
31
|
+
embedded in the constraint object passed as the second parameter to that
|
32
|
+
method.
|
33
|
+
|
34
|
+
<p>Here's a very simple assert using the constraint model:
|
35
|
+
<pre> Assert.That( myString, Is.EqualTo("Hello") );</pre>
|
36
|
+
|
37
|
+
<p>The second argument in this assertion uses one of NUnit's <b>syntax helpers</b>
|
38
|
+
to create an <b>EqualConstraint</b>. The same assertion could also be made in this form:
|
39
|
+
<pre> Assert.That( myString, new EqualConstraint("Hello") );</pre>
|
40
|
+
|
41
|
+
<p>Using this model, all assertions are made using one of the forms of the
|
42
|
+
Assert.That() method, which has a number of overloads...
|
43
|
+
|
44
|
+
<div class="code" style="width: 36em">
|
45
|
+
<pre>Assert.That( object actual, IConstraint constraint )
|
46
|
+
Assert.That( object actual, IConstraint constraint, string message )
|
47
|
+
Assert.That( object actual, IConstraint constraint, string message,
|
48
|
+
object[] parms )
|
49
|
+
|
50
|
+
Assert.That( bool condition );
|
51
|
+
Assert.That( bool condition, string message );
|
52
|
+
Assert.That( bool condition, string message, object[] parms );</pre>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<p>If you derive your test fixture class from <b>AssertionHelper</b>, the
|
56
|
+
Expect() method may be used in place of Assert.That()...
|
57
|
+
|
58
|
+
<div class="code" style="width: 36em">
|
59
|
+
<pre>Expect( object actual, IConstraint constraint )
|
60
|
+
Expect( object actual, IConstraint constraint, string message )
|
61
|
+
Expect( object actual, IConstraint constraint, string message,
|
62
|
+
object[] parms )
|
63
|
+
|
64
|
+
Expect( bool condition );
|
65
|
+
Expect( bool condition, string message );
|
66
|
+
Expect( bool condition, string message, object[] parms );</pre>
|
67
|
+
</div>
|
68
|
+
|
69
|
+
<p>The overloads that take a bool work exactly like Assert.IsTrue.
|
70
|
+
|
71
|
+
<p>For overloads taking a constraint, the argument must be a object implementing
|
72
|
+
the <b>IConstraint</b> interface, which supports performing a test
|
73
|
+
on an actual value and generating appropriate messages. This interface
|
74
|
+
is described in more detail under
|
75
|
+
<a href="customConstraints.html">Custom Constraints</a>.
|
76
|
+
|
77
|
+
<p>NUnit provides a number of constraint classes similar to the <b>EqualConstraint</b>
|
78
|
+
used in the example above. Generally, these classes may be used directly or
|
79
|
+
through a syntax helper. Test fixture classes inheriting from <b>AssertionHelper</b>
|
80
|
+
are able to use shorter forms. The valid forms are described on the pages related to
|
81
|
+
each constraint. Note that the menu items listed to the right generally reflect the
|
82
|
+
names of the syntax helpers.
|
83
|
+
|
84
|
+
<p><b>See also:</b> the
|
85
|
+
<a href="classicModel.html">classic model</a> of assertions.
|
86
|
+
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
<!-- Submenu -->
|
91
|
+
<div id="subnav">
|
92
|
+
<ul>
|
93
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
94
|
+
<ul>
|
95
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
96
|
+
<li><a href="assertions.html">Assertions</a></li>
|
97
|
+
<ul>
|
98
|
+
<li><a href="classicModel.html">Classic Model</a></li>
|
99
|
+
<li id="current"><a href="constraintModel.html">Constraint Model</a></li>
|
100
|
+
<ul>
|
101
|
+
<li><a href="equalConstraint.html">Equal Constraint</a></li>
|
102
|
+
<li><a href="sameasConstraint.html">SameAs Constraint</a></li>
|
103
|
+
<li><a href="conditionConstraints.html">Condition Constraints</a></li>
|
104
|
+
<li><a href="comparisonConstraints.html">Comparison Constrants</a></li>
|
105
|
+
<li><a href="typeConstraints.html">Type Constraints</a></li>
|
106
|
+
<li><a href="stringConstraints.html">String Constraints</a></li>
|
107
|
+
<li><a href="collectionConstraints.html">Collection Constraints</a></li>
|
108
|
+
<li><a href="propertyConstraint.html">Property Constraint</a></li>
|
109
|
+
<li><a href="compoundConstraints.html">Compound Constraints</a></li>
|
110
|
+
<li><a href="customConstraints.html">Custom Constraints</a></li>
|
111
|
+
<li><a href="listMapper.html">List Mapper</a></li>
|
112
|
+
</ul>
|
113
|
+
</ul>
|
114
|
+
<li><a href="attributes.html">Attributes</a></li>
|
115
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
116
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
117
|
+
<li><a href="features.html">Other Features</a></li>
|
118
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
119
|
+
<li><a href="samples.html">Samples</a></li>
|
120
|
+
<li><a href="license.html">License</a></li>
|
121
|
+
</ul>
|
122
|
+
</ul>
|
123
|
+
</div>
|
124
|
+
<!-- End of Submenu -->
|
125
|
+
|
126
|
+
|
127
|
+
<!-- Standard Footer for NUnit.org -->
|
128
|
+
<div id="footer">
|
129
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
130
|
+
</div>
|
131
|
+
<!-- End of Footer -->
|
132
|
+
|
133
|
+
</body>
|
134
|
+
</html>
|
@@ -0,0 +1,106 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - ContextMenu</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>Context Menu</h2>
|
28
|
+
|
29
|
+
<p>The context menu is displayed when one of the tree nodes is right-clicked.</p>
|
30
|
+
|
31
|
+
<h4>Run</h4>
|
32
|
+
<p>Runs the selected test - disabled if a test is running.</p>
|
33
|
+
|
34
|
+
<h4>Run All</h4>
|
35
|
+
<p>Runs all the tests.</p>
|
36
|
+
|
37
|
+
<h4>Run Failed</h4>
|
38
|
+
<p>Runs only the tests that failed on the previous run.</p>
|
39
|
+
|
40
|
+
<h4>Show Checkboxes</h4>
|
41
|
+
<p>Turns the display of checkboxes in the tree on or off. The checkboxes may
|
42
|
+
be used to select multiple tests for running.</p>
|
43
|
+
|
44
|
+
<h4>Expand</h4>
|
45
|
+
<p>Expands the selected test node � invisible if the node is expanded or has no children.</p>
|
46
|
+
|
47
|
+
<h4>Collapse</h4>
|
48
|
+
<p>Collapses the selected test node � invisible if the node is collapsed or has no children.</p>
|
49
|
+
|
50
|
+
<h4>Expand All</h4>
|
51
|
+
<p>Expands all nodes of the tree.</p>
|
52
|
+
|
53
|
+
<h4>Collapse All</h4>
|
54
|
+
<p>Collapses all nodes in the tree to the root.</p>
|
55
|
+
|
56
|
+
<h4>Load Fixture</h4>
|
57
|
+
<p>Reloads only the currently selected fixture or namespace. The fixture,
|
58
|
+
once loaded, remains in effect through any subsequent reloads. This generally
|
59
|
+
results in substantial reduction in load time.</p>
|
60
|
+
|
61
|
+
<h4>Clear Fixture</h4>
|
62
|
+
<p>Reloads all the tests, clearing the currently loaded fixture.</p>
|
63
|
+
|
64
|
+
<h4>Properties</h4>
|
65
|
+
<p>Displays the <a href="testProperties.html">Test Properties</a> for the selected test node.</p>
|
66
|
+
|
67
|
+
</div>
|
68
|
+
|
69
|
+
<!-- Submenu -->
|
70
|
+
<div id="subnav">
|
71
|
+
<ul>
|
72
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
73
|
+
<ul>
|
74
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
75
|
+
<li><a href="assertions.html">Assertions</a></li>
|
76
|
+
<li><a href="attributes.html">Attributes</a></li>
|
77
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
78
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
79
|
+
<ul>
|
80
|
+
<li><a href="guiCommandLine.html">Command-Line</a></li>
|
81
|
+
<li><a href="mainMenu.html">Main Menu</a></li>
|
82
|
+
<li id="current"><a href="contextMenu.html">Context Menu</a></li>
|
83
|
+
<li><a href="optionsDialog.html">Options Dialog</a></li>
|
84
|
+
<li><a href="addinsDialog.html">Addins Dialog</a></li>
|
85
|
+
<li><a href="testProperties.html">Test Properties</a></li>
|
86
|
+
<li><a href="configEditor.html">Configuration Editor</a></li>
|
87
|
+
<li><a href="projectEditor.html">Project Editor</a></li>
|
88
|
+
</ul>
|
89
|
+
<li><a href="features.html">Other Features</a></li>
|
90
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
91
|
+
<li><a href="samples.html">Samples</a></li>
|
92
|
+
<li><a href="license.html">License</a></li>
|
93
|
+
</ul>
|
94
|
+
</ul>
|
95
|
+
</div>
|
96
|
+
<!-- End of Submenu -->
|
97
|
+
|
98
|
+
|
99
|
+
<!-- Standard Footer for NUnit.org -->
|
100
|
+
<div id="footer">
|
101
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
102
|
+
</div>
|
103
|
+
<!-- End of Footer -->
|
104
|
+
|
105
|
+
</body>
|
106
|
+
</html>
|