NUnit 2.4.1 - May 3, 2007
- When the NUnit help is not installed, the Help menu item now displays the
documentation from the NUnit web site.
- The following Assert overloads have been added
- Assert.Greater(long, long)
- Assert.Greater(ulong, ulong)
- Assert.GreaterOrEqual(long, long)
- Assert.GreaterOrEqual(ulong, ulong)
- Assert.Less(long, long)
- Assert.Less(ulong, ulong)
- Assert.LessOrEqual(long, long)
- Assert.LessOrEqual(ulong, ulong)
- When a load or reload is in progress, an indicator message is now
displayed, centered on top of the form. The form is now displayed
earlier in the startup sequence so that error messages do not appear
- When a non-existent assembly is specified on the command line, the
gui no longer closes after the error message is dismissed.
- When the option to re-run tests when assembly changes is selected,
the last set of tests run is now re-run, rather than running all tests.
- The failure message for tests failing due to a problem with the
TestFixtureSetUp now indicate the name of the failing fixture.
- The TestCase class has a new virtual method MakeTestCaseResult(),
allowing extensions to use a derived TestCaseResult if desired. Because
NUnit makes no use of additional properties or methods added to the
TestCaseResult, some sort of custom processing is required for this
feature to be useful. Extenders should be aware that inheriting from
TestCase currently makes the extension dependent on a particular version
- A brief list of "Tips for Writing Extensions" has been added to the documentation.
- CollectionAsserts no longer fail on collections containig null values.
- The obsolete file, nunit-gui.exe, has been removed from the zip distribution.
- The errors and failures display now recalculates the space available and
enables or disables the scrollbar whenever it is resized.
- The xml file automatically saved by the Gui when a test is run is now
correctly named as TestResult.xml rather than TestTesult.xml.
- The Explicit attribute now works correctly when specified on
a test fixture.
- The /cleanup option no longer throws an exception when the shadow copy
cache directory is not present.
- The current directory is now set correctly when running a SetUpFixture.
- Non-default test load options are no longer ignored when loading tests in
- The Errors and Failures display is now re-drawn with the scroll bars
enabled/disabled as needed whenever it is resized.
- The MaxTimeDecorator example no longer shows the name of a test
case repeated twice in the full name of the test.
NUnit 2.4 Final Release (22.214.171.124) - March 16, 2007
- A new /cleanup commandline option deletes NUnit's shadow copy
cache and then exits.
- When NUnit is run under .Net 1.1, assemblies built with .Net 2.0
are not displayed in the recent files list. NUnit automatically loads
the last assembly that was opened under .Net 1.1.
Note: When a program built with .Net 1.1 is run under .Net 2.0,
it will not appear in the Recent Files list the next time NUnit is run
under .Net 1.1. This issue will be fixed in a future release.
- When the NUnit documentation is not installed, the Help menu item
now displays the NUnit web site.
- The user interface (NUnitForm.cs) was not properly displayed at
design time due to a problem with detecting DesignMode in nested
- CollectionConstraint was failing to find contained items in
a collection implementing ICollection only - that is not implementing
IList. This is now fixed and all collections use the same code path
to avoid future problems.
- The Tree setting "Show Checkboxes" was not being saved properly.
- Many of NUnit's own tests were leaving files in the shadow
copy cache due to not closing the test domain.
- NUnit was attempting to instantiate an abstract class, derived
from another abstract class marked with TestFixtureAttribute. NUnit
will now mark all abstract classes with this attribute, or inheriting
from classes with this attribute as non-runnable.
NUnit 2.4 RC2 (126.96.36.199) - March 9, 2007
- The Is class has been moved to the SyntaxHelpers namespace in order
to eliminate conflicts with mock object frameworks. Additional helper
classes List, Has and Text have been added.
- The AssertionHelper class has been added as an optional
base class for user fixtures. Use of this class as a base makes methods
available for creating constraints needing to use one of the helper
- A PropertyConstraint has been added, which allows testing the
value of one of an object's properties.
NUnit 2.4 RC1 (2.4.0) - February 25, 2007
- Two packages, built under the 1.1 and 2.0 runtimes, are provided
as before, but they are now mutually exclusive - only one may be installed.
By downloading the source, you can rebuild NUnit under other runtimes. See
the Platform Support page for
details about the runtimes under which each each package may be run.
- If you build NUnit from source, you will notice that the full text
of the license is no longer included in every file. For easier maintenance, we
now put a short notice in the source files, which refers to the license.
- Fit tests are now provided. The tests supplied are fairly rudimentary,
but it's a start! The Fit assemblies required to run the tests are included
with the NUnit distribution. You can get a complete Fit download, including
source code, at the Fit website.
- Samples are now organized by language and additional samples
have been provided. C++ samples are provided using both the VS2003
managed C++ syntax and the new C++/CLI syntax for VS2005. Solution files
group samples by language, with an additional solution for extensibility samples.
- The nunit.common assembly, added in the Alpha release, has been eliminated.
- A new syntax and internal architecture for Asserts is being introduced in
this release, based on the notion of constraints found in JMock and NMock.
- The Assert.That method is used to make an assertion based on a
- Assert.That( actual, constraint, message, args );
- Assert.That( actual, constraint, message );
- Assert.That( actual, constraint );
- The constraint argument may be specified directly using one of the
built-in constraint classes or a user-defined class.
- It may also be specified using one of the syntax helpers provided as
static methods of the Is class, such as
See the docs for complete information.
- Is.EqualTo( object )
- Is.CollectionContaining( object )
- Is.SubsetOf( collection )
- Internally, all the "classic" Assert methods, like AreEqual, have been
re-implemented using the underlying constraint architecture.
- The old approach to extending Asserts by creating Asserter classes
is now deprecated and the classes and interfaces are marked Obsolete.
- A number of changes have been made to the ExpectedException attribute
- Several constructors for ExpectedExceptionAttribute have
been removed and two are now marked obsolete. All functionality
continues to be available through the use of named parameters. See
the documentation for details.
- User-defined ExceptionHandlers are now supported:
- A handler takes a System.Exception as an argument and returns void.
Normal Assert statements are used to validate the exception.
- A default handler may be specified for the fixture by implementing
the IExpectException interface.
- Individual test case handlers may be specified by use of the
Handler named parameter.
- The ExpectedException attribute may be used without
an exception type, leaving all validation to the ExceptionHandler.
- A custom error message may be displayed by use of the UserMessage
- The StringAssert class has a new IsMatch method
that does regular expression matching.
- The setup and teardown methods in a SetUpFixture are now
marked by the SetUpAttribute and TearDownAttribute rather
than the corresponding "Fixture" attributes used in earlier betas.
- NUnit now recognizes user-defined attributes derived from CategoryAttribute
and PropertyAttribute. Protected constructors are provided for use by derived classes:
- protected CategoryAttribute()
- Creates a category with the same name as the derived class.
- protected PropertyAttribute(object attributeValue)
- Creates a property with the same name as the derived class.
Note: Other attributes remain sealed, as in prior releases.
- User settings are now stored in an XML file rather than the registry.
Any existing settings from NUnit 2.2 or from earlier betas are migrated on first use.
- Properties assigned to tests are now included in the XML output file.
- Internally, many classes which were previously defined as singletons are
now treated as services, managed by a ServiceManager.
- The new /domain option controls of the creation of AppDomains for running tests.
The following values are recognized:
The default is to use multiple domains if multiple assemblies are listed on
the command line. Otherwise a single domain is used.
- No domain is created - the tests are run in the primary domain. This normally
requires copying the NUnit assemblies into the same directory as your tests.
- A test domain is created - this is how NUnit worked prior to version 2.4
- A separate test domain is created for each assembly
- The obsolete /thread option has been replaced by /nothread.
Since tests have been run on a separate thread by default for some time,
the old option had no effect.
Note: Default use of a separate test thread is intended to isolate
NUnit from changes made to the thread context. Tests that change the context
and don't restore it should not be run using this option.
- The GUI command line now supports /include and /exclude options for
categories. Only one of the two may be used at a time. These options effect
the initial category selection in the GUI.
- The XML test results are now saved automatically in file TestResult.xml
at the end of each run.
- An option is provided to suppress shadow-copying of assemblies.
- The Test Properties dialog now displays properties assigned to a test.
The text fields for categories and properties have been replaced with listboxes.
- Trace output from tests is displayed in a tab in the GUI. Optionally,
trace and stderr output may be redirected to the Console output tab
- The position, size and font of the mini-Gui window are now saved separately
from the full-size window.
- Internally, the gui display has been refactored so so that the tab
display is provided by a separate control.
- The Windows install packages set up individual shortcuts for running under
each of the supported runtimes installed on your system. If additional supported
runtimes are installed, you can create similar shortcuts yourself or reinstall
NUnit to have them created automatically.
NUnit 2.4 Beta 2 Release (2.3.6293) - October 20, 2006
- A new assembly, nunit.core.interfaces, is being introduced in this release.
This assembly holds interfaces, enumerations and data types that are intended
for external use - for example, by client code that executes NUnit tests. Our
intent is to hold the version number of this assembly constant through all
NUnit 2.4 maintenance releases and to avoid any breaking changes in this code.
- The Windows installer is now built using WiX. With the removal of
the Visual Studio deployment project from the VS2005 solution, it is
now possible to build NUnit completely using C# Express.
- The nunit.framework assembly is no longer installed in the GAC.
- The AreEqual and AreNotEqual asserts have been enhanced to work with
multi-dimensional arrays and jagged arrays.
- The error message for AreEqual with doubles and floats now includes
the tolerance that was used in the comparison.
- The handling of categories was not being done correctly. This is now fixed.
- The '/' character is no longer accepted for command-line options under Linux.
Any argument beginning with '/' is taken as a path.
- Fixed bug causing the /include and /exclude parameters to be ignored.
- Added a dialog to the Tools menu for displaying installed NUnit add-ins.
- Modified the Tree submenu of the View menu to simplify choices for
expanding and collapsing the tree.
- Added an entry to the View menu for displaying info about loaded test assemblies.
- Added Run All, Run Failed, Show CheckBoxes, Expand All and Collapse All
items to the tree context menu.
- When right-clicking in the tree below the lowest node, the context menu commands
now relate to the currently selected node or nodes rather than the last node the
user right-clicked on.
- The '/' character is no longer accepted for command-line options under Linux.
Any argument beginning with '/' is taken as a path.
- The category list is now cleared when a project is closed.
- The "Word Wrap" checkbox has been removed. The setting is now available on
the Options Dialog.
- Automatic rerun of tests on change now works correctly.
- The extensibility mechanism has been generalized to allow a wider range
of future extension points. The following new attributes and interfaces
- Used to mark all addins and optionally specify Type, Name and Description
- Indicates whether the addin provides Core, Client or Gui extensions.
- Interface implemented by all addins, which allows the addin to install itself.
- Interface supported by each NUnit extension host. Each host provides a number of extension points.
This release provides only the Core extension host. Future releases will provide Client and Gui hosts.
- Interface supported by an extension point, allowing an addin to install and remove the extensions it provides.
- Interface allowing addins that support external test frameworks to register them with NUnit.
NUnit 2.4 Beta 1 Release (2.3.6162) - June 11, 2006
- Additional NUnit tests now pass under Linux. Those that do not have
been excluded using the Platform attribute.
- Added a Reason property to ExplicitAttribute, for use in explaining why a test is marked Explicit.
- Multiple SetUp or TearDown methods now give a more meaningful error message.
- The console now outputs test failures to Trace all the time, not just
when running under the debugger. You will see clickable trace output in
Visual Studio even if you use the Start Without Debugging menu item.
- Added Test Menu with entries for running the selected test, all tests or failed tests.
- Instead of displaying a dialog box, unhandled exceptions now display in the
Errors & Failures tab, with an indication of the test that was running
when the exception was thrown. The test itself is not shown as a failure,
(unless it failed for some other reason, since it may not have caused the
exception. The progress bar turns red if any unhandled exceptions are thrown.
- The GUI no longer crashes when reloading assemblies with added or deleted
NUnit 2.4 Alpha Release (2.3.6142) - May 22, 2006
- The source code directory structure has been reorganized to separate NUnitFramework and
- A new nunit.common assembly isolates core interfaces.
- The following assemblies are now strongly named: nunit.mocks, nunit.core.extensions
- NUnit may now be installed by non-administrators, subject to any security
restrictions imposed by the particular site.
- The .Net 2.0 builds of NUnit are now called "NUnit for .Net 2.0"
- The NAnt build script has been simplified and now consists only of the
nunit.build and nunit.build.include files.
- The NAnt build script now has a target for building under the Mono 2.0 profile.
- NUnit is now been built and tested using both Microsoft .Net (1.0, 1.1, 2.0) and Mono
(1.0 and 2.0 profiles).
Note: in the Alpha release, a number of tests are skipped
when running under Linux or Unix.
- When multiple assemblies are loaded, they may use a single AppDomain, as now,
or a separate AppDomain for each assembly. The new option provides greater
isolation of the tests and allows use of separate config files for each assembly.
Note: In the Alpha release, separate config files are required when
this option is used, even if an NUnit project is loaded.
- The automatic creation of test suites for each namespace is now optional. When
the creation of these suites is suppressed, the fixtures are loaded as a simple
flat list, without any hierarchy imposed.
- When multiple assemblies are loaded, the tests may optionally be merged. If
automatic namespace suites are enabled, namespaces are merged across assemblies.
This option is only available if a single AppDomain is used.
- The fixture object is created for the life of the test run and is no longer
reused on subsequent runs. If the object implements IDisposable, Dispose
is called before destroying it.
- The current directory is set to the location of the test assembly before
running each fixture. This change facilitates running fixtures in any order
and eliminates interference between fixtures that change the current directory.
- Non-public fixture classes are treated as non-runnable and display a warning
message rather than being silently ignored.
- A new SetUpFixture allows one-time SetUp and TearDown at the level of a
NameSpace or for an entire assembly.
- The TestRunner no longer passes "live" tests back to the gui or console.
Instead, a data class that encapsulates the info about the test is sent.
- Registry settings are now stored under nunit.org. Old settings are migrated
automatically when the application is first run.
- When the default config for a test project is set to "NUnitAutoConfig"
the configuration of the current NUnit build is automatically selected
for the tests, if available. This is intended for use by NUnit developers.
- When multiple assemblies are passed on the command line, the console runner
now loads those assemblies into separate AppDomains. Separate config files
should be provided for each assembly in this case.
- The /include and /exclude> options may now be combined on
the command line. When both are used, all tests with the included categories
are run except for those with the excluded categories.
- The gui executable is now called "nunit.exe" rather than "nunit-gui.exe"
- There is a new option to automatically re-run the test whenever
a change is detected.
- A new "mini-gui" configuration may be selected from the View menu. This
display consists of the tree view area only. All info about the tests may
be accessed via the properties display or by returning to the full gui.
- The following additional Gui customizations are also available through the
- The font used in the Gui may be changed
- The four info tabs on the right may be turned on or off
- The status bar may be removed
- Menu items pertaining to expansion and collapse of the tree have been moved
to the Tree submenu of the View menu.
- The Options dialog has been reorganized to add new options for running tests
and to better group similar items.
- The Test Properties dialog has been reorganized to display all info on a
single page and to more clearly show the status of the test.
- The icons used for tests in the tree view now show test status by use of
symbols, in addition to their color:
- Not Run
- Grey circle
- Green circle with a check mark in it
- Red circle with an X mark in it
- Yellow circle with a question mark in it
- For further customization of the icons, users may modify or replace the
files Success.jpg, Failure.jpg or Ignored.jpg in the NUnit bin directory.
- Tests that are not run due to the Explicit or Platform attributes are no
longer considered as Ignored. They remain marked as grey in the gui and
do not affect the color of the progress bar.
- Wordwrap may be turned on and off in the 'Errors and Failures' tab by use
of a checkbox at the bottom of the tab.
- NUnit now supports three types of core addins:
- Allow an extender to provide new types of test fixtures with
their own behavior.
- Allow an extender to provide new types of test cases, either
as a part of a custom test fixture or within a standard NUnit
- Allow an extender to modify the behavior of
a standard or custom test case or fixture. This is a good
choice for implementing attributes that should apply to
various types of tests.
- Addin assemblies may now be deployed by copying them assembly to the
NUnit bin/addins directory.
- Extensions distributed as part of NUnit are now divided between the two
assemblies nunit.core.extensions and nunit.framework.extensions. Only the
latter is intended to be referenced by user tests.
- This Alpha release of NUnit provides only one internal extension: the Repeat
attribute may be applied to test cases to cause them to run a number of
times. The extensions emulating CsUnit and VSTS tests, which were included
experimentally in recent versions of NUnit 2.2 have been removed and will
be distributed separately.
- Several trivial examples, which were formerly part of the extensions
assmebly are now included as samples.
- Documentation for NUnit's extensibility features is still in preparation.
Cumulative notes through NUnit 2.2.10 are available here