Release Notes
NUnit 2.4.5 - November 23, 2007
Bug Fixes
- The included log4net dll has been replaced with a version that works on all runtime platforms.
- CollectionConstraint no longer confuses expected and actual counts
- Radio buttons on the TestLoader settings page now work correctly
- The MaxTimeTestDecorator sample has been fixed so that test attributes are recogized
- Invalid data in the Settings file, no longer causes an exception
- Documentation has been corrected in several places and missing files added
NUnit 2.4.4 - October 20, 2007
General
- NUnit now uses log4net rather than Trace for its own internal logging. If
enabled by the NUnit config files, log entries are saved in the file NUnit.log
located in the Application Data directory.
Note: Using the supplied config file, log4net currently fails to create
the log file when running under Mono on Windows platforms. As a workaround, you
may edit the configs to use a hardcoded path in place of the $(APPDATA) macro.
Framework
- A suite marked with the SuiteAttribute is now permitted to return a collection
of fixture objects or Types, rather than a TestSuite. This eliminates the need
for the tests to reference the nunit.core assembly.
- Classes containing suites may now use the TestFixtureSetUp and TestFixtureTearDown
attributes to decorate methods to be called for one-time setup and teardown.
Note: This feature has actually been in place since the 2.4 release, but
was not previously reported in the release notes.
- It is now possible to specify a TimeSpan as a tolerance when comparing
two DateTime objects for equality.
- Tests may now set a default tolerance for floating point comparisons may now
be set using GlobalSettings.DefaultFloatingPointTolerance. If not set, a
tolerance of 0.0d is used for backward compatibility.
- String comparison failures now show more context than before, using the
full width of the message line. The length of the message line defaults to 78
but may be changed by setting TextMessageWriter.MaxLineLength. Set it to an
arbitrarily high value to avoid all string truncation. Use the NoClip
modifier on an equality constraint to prevent clipping on an individual
assert.
Gui
- Cosmetic changes have been made to the main Gui window and the tabbed Options
dialog has been replaced with a tree-based dialog in order to allow more
opportunity for expanded options.
- User logging through log4net is captured and displayed by the Gui.
- A new Test Output Options pane allows controlling exactly what appears in
each text window. By default, NUnit uses four tabs: StdOut, StdErr, Trace and
Log, but the user may remove, create or combine tabs as desired.
- A new command-line option /console causes a console to be
allocated. This should be used when testing applications that used unmanaged
APIs to write to stdout, since NUnit is not able to capture that output.
Extensibility
- A new ExtensionPoint has been added. The Listeners extension
point allows an addin to install an EventListener in the test domain,
which is called as the tests are run. Note that the call is asynchronous and
therefore may not be used to control the running of the tests, but only to
report information or take other action based on the events.
- The implementation of NUnitTestFixture has been modified so that
it is now possible to write a TestCaseBuilder addin, which will replace
or enhance the builtin creation of TestCases.
Bug Fixes
- The ability to select and copy text from the text output windows, which
was unintentionally dropped in NUnit 2.4.3, has been restored.
- The programs nunit-console-x86.exe and nunit-x86.exe are now being installed
correctly by the .NET 2.0 Windows installer package.
- Checked tests are now ignored when the checkboxes are hidden.
- Fixed a problem loading assemblies with multiple # characters in the path
- Tests are no longer executed twice with certain combinations of reload/rerun settings
- Obsolete /framework option is no longer displayed by the console runner help
- The console runner now accepts both /include and /exclude options
- The Gui "loading" and "reloading" notices are now sized correctly under Mono
- Trace output, which was disabled in 2.4.3, is now displayed correctly.
- The exception message is now displayed when the wrong exception type is received from a testcase marked with ExpectedException
- The EmptyCollection constraint now throws an exception if applied to a null reference rather than returning false
- Reloading a single assembly no longer changes the config file name
- Changing options without a loaded project no longer gives an exception
- The Show Checkboxes entry on the tree context menu now works correctly.
- All levels of teardown now run when an exception is thrown
NUnit 2.4.3 - August 16, 2007
General
- Mono compatibility is significantly improved. The Gui runs under Mono
1.2.2. A number of tests, which were previously skipped under Mono, are now
executed successfully. See the
Platform Support
page on the website for more information.
- Documentation is now available as a separate download.
Console Runner
- The console runner now uses negative return codes for errors encountered
in trying to run the test.
Failures or errors in the test themselves give a positive return
code equal to the number of such failures or errors.
Bug Fixes
- Comparisons between numeric values of various types now work correctly (see note).
- Fixed crashing problems running the Gui under .NET 1.0. and Mono.
- Fixed several problems when the new Load Fixture facility of the Gui:
- An exception is no longer thrown when using it with multiple AppDomains.
- The Load Fixture menu item is no longer enabled for the top-level node.
- Assemblies within a test project now load without error.
- The full namespace hierarchy is now shown when loading a TestFixture.
- Fixed incorrect implementation of CollectionAssert.AreEquivalent and
CollectionAssert.IsEqualTo so that the number of occurences of an object
in a collection is properly taken into account (see note).
Note: Several of these fixes may cause failures of tests, which
had appeared to pass. In most cases, the passing tests were probably
false positives.
NUnit 2.4.2 - August 2, 2007
General
- The .Net 2.0 packages now include nunit-x86.exe and nunit-console-x86.exe,
which may be used to test 32-bit code on 64-bit systems.
Framework
- Numeric comparison is now performed by converting the expected and actual
values to the widest of the two types rather than by comparing the string
representation of the two values. This eliminates certain problems with
decimals and floats and is more representative of how the comparison would
be performed in most programming languages.
- Two new attributes allow tailoring the tests for different cultures
- CultureAttribute
- Allows you to specify the cultures under which a test should be
run or skipped. It works just like PlatformAttribute, supporting named
parameters Include, Exclude and Reason. You can use local cultures ("en-GB")
or neutral cultures ("en"). It may be used on tests, fixtures or assemblies.
- SetCultureAttribute
- Changes the culture for the duration of the test. As of this release,
only a single culture may be specified, so you will need to create a separate
test method for each culture under which you want ta test to be run.
- Expected and actual value messages created by NUnit now use the InvariantCulture
in formatting numeric values. DateTime values are formatted as "yyyy-MM-dd HH:mm:ss.fff".
- A number of changes have been made to the constraint-based Assert syntax
introduced in version 2.4:
- EqualTo(...).Within(...)
- A tolerance may be specified
for any numeric type and works as expected. The value specified as a tolerance
must be convertible to the type used in the comparison or an exception will
be thrown.
- Collection Asserts
- Asserts that require a collection as the actual value now throw an exception
if the value is not a collection. In earlier releases, the test failed, which
caused false positives when it was modified by Not.
- Syntax Helpers
- NUnit 2.4.1 provided four SyntaxHelpers: Is, List, Text and the
undocumented Has helper. In 2.4.2, there are three helpers, with the List
class now being used for mapping collections as describe below.
Rather than inheriting from a common base containing properties like Not and
All, each SyntaxHelper now implements only specific properties.
- Is defines the large majority of constraint tests. Since it is
a keyword in Visual Basic, the synonym Iz is provided for VB users.
Constraint operators Is.All and Is.Not are supported.
- Text defines constraints that are specific to strings.
Constraint operator Is.All is supported as well.
- Has is newly documented and extended in 2.4.2. It is used to make
tests on members of collections, elements of arrays, entries in dictionaries
and properties of objects. Operators Has.No, Has.All,
Has.Some and Has.None are supported.
- List.Contains() has been replaced by Has.Member().
- List.Map
- Used to map a collection provided as an actual value to another collection
to which constraints are then applied. Currently supports creating a list
of the values of a given property. See the documentation for details.
- The IConstraint interface has been removed. Custom constraint
classes should inherit from the Constraint abstract class.
Core
- When tests in an NUnit project are run in multiple AppDomains, any non-default
values set for AppBase, PrivateBinPath and Configuration File are now honored for
each separate assembly. If values are not provided, the default is to use the
location of each assembly together with any config file with the name of the
assembly plus the ".config" extension. When running in a single AppDomain, the
existing defaults are unchanged.
- Any changes to the current directory or current culture made during a test
are now restored at the end of the test. For example, if you set the culture
with code in your TestFixtureSetUp, that change will remain in place until
all tests are run and the TestFixtureTearDown completes. At that point, the
value will be restored to what it was before.
Gui
- The main window is activated whenever a test run has failures. This causes
NUnit's taskbar button to be highlighted if the window is minimized or hidden.
- The reload menu item is now called Reload Tests. It continues to work as
before, causing any changes in the assemblies to be merged into the tree. A new
menu item, Reload Project, does a complete load by closing the project and
reopening it as if the user had done so through the Open menu item.
- Separate recent file lists are maintained, one for running under .NET 2.0
and one for earlier versions of the runtime. This useful for developers who work
on multiple projects as well as those who maintain configurations for different
runtimes in the same project file.
- The tree context menu contains an entry to load the selected fixture alone.
Developers working on large projects can reduce reloading time significantly
by using this feature to load only a subset of the tests. A separate context
menu item is used to reload the full project.
Note: This feature is a quick and dirty solution to the problem
of reload time. It is limited to a single selected item because that's
what the underlying test loader currently supports. Future releases will
deal with this in an entirely different way.
- The Gui can now save and restore the visual state of the tree when a
project is closed and restores it on open. The following items are saved:
- Whether checkboxes are shown
- The topmost visible node
- The selected node
- Which nodes are expanded or collapsed
- Which nodes are checked
- Which categories are selected
This is controlled by a selection on the Options Dialog.
Note: TopNode is restored correctly under .NET 2.0. Under .NET 1.1
the node is made visible but may not be at the top of the display.
- A summary of the last test run is shown below the progress bar. This
information remains displayed even when the information in the status
bar changes.
- The Gui now remembers the last result tab selected.
- The Project Editor now displays a confirmation box when you attempt
to delete an assembly from the project.
- If you change settings in the Options Dialog, which require a reload
in order to take effect, a message box gives you the opportunity to
reload the project immediately.
- If you change the active configuration - as from Debug to Release - and
the new config can not be loaded, the old configuration is unloaded. In prior
releases, the old config remained loaded even though the new config was
marked as active.
- The "Reloading..." message is now displayed when automatic reloading
takes place.
Bug Fixes
- A comparer passed to CollectionAssert.AreEqual is now used
- An error message is now displayed if the test result file can not be written
- AbstractTestCaseDecoration no longer duplicates the fixture name
- Renamed and deleted tests are now correctly removed from the Gui display
- The internally used create-msi target is no longer displayed by the project help for NUnit.build
- TipWindow no longer gives an IndexOutOfRangeException in certain situations
- Failures are now reported correctly when running multiple assemblies in separate AppDomains
- Recent file names containing a comma no longer cause an exception
- Is.EqualTo(x).Within(y) now works correctly for floats
- TestFixtureTearDown was not being called on fixtures marked as Explicit
- Exclude checkbox in Gui is now cleared when all categories are removed
- Tab order in the properties dialog has been corrected
- The install files are now included in the source package
NUnit 2.4.1 - May 3, 2007
General
- When the NUnit help is not installed, the Help menu item now displays the
documentation from the NUnit web site.
Framework
- 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)
Gui
- 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
in isolation.
- 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.
Extensibility
- 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
of NUnit.
- A brief list of "Tips for Writing Extensions" has been added to the documentation.
Bug Fixes
- 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
multiple AppDomains.
- 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 (2.4.0.2) - March 16, 2007
Gui
- 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.
Bug Fixes
- The user interface (NUnitForm.cs) was not properly displayed at
design time due to a problem with detecting DesignMode in nested
User Controls.
- 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 (2.4.0.1) - March 9, 2007
Framework
- 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
classes.
- 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
General
- 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.
Framework
- 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
constraint
- 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
- Is.Null
- Is.Empty
- Is.EqualTo( object )
- Is.CollectionContaining( object )
- Is.SubsetOf( collection )
See the docs for complete information.
- 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
named parameter.
- 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.
Core
- 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.
Console
- The new /domain option controls of the creation of AppDomains for running tests.
The following values are recognized:
- None
- 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.
- Single
- A test domain is created - this is how NUnit worked prior to version 2.4
- Multiple
- A separate test domain is created for each assembly
The default is to use multiple domains if multiple assemblies are listed on
the command line. Otherwise a single domain is used.
- 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.
Gui
- 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
General
- 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.
Framework
- 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.
Console
- 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.
Gui
- 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.
Extensibility
- The extensibility mechanism has been generalized to allow a wider range
of future extension points. The following new attributes and interfaces
are used:
- NUnitAddinAttribute
- Used to mark all addins and optionally specify Type, Name and Description
- ExtensionType
- Indicates whether the addin provides Core, Client or Gui extensions.
- IAddin
- Interface implemented by all addins, which allows the addin to install itself.
- IExtensionHost
- 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.
- IExtensionPoint
- Interface supported by an extension point, allowing an addin to install and remove the extensions it provides.
- IFrameworkRegistry
- 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
General
- Additional NUnit tests now pass under Linux. Those that do not have
been excluded using the Platform attribute.
Framework
- 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.
Console
- 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.
Gui
- 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
tests.
NUnit 2.4 Alpha Release (2.3.6142) - May 22, 2006
General
- The source code directory structure has been reorganized to separate NUnitFramework and
NUnitCore.
- A new nunit.common assembly isolates core interfaces.
- The following assemblies are now strongly named: nunit.mocks, nunit.core.extensions
and nunit.framework.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.
Framework
Core
- 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.
Console
- 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.
Gui
- 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
View menu:
- 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
- Success
- Green circle with a check mark in it
- Failure
- Red circle with an X mark in it
- Ignored
- 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.
Extensibility
- NUnit now supports three types of core addins:
- SuiteBuilders
- Allow an extender to provide new types of test fixtures with
their own behavior.
- TestCaseBuilders
- Allow an extender to provide new types of test cases, either
as a part of a custom test fixture or within a standard NUnit
fixture.
- TestDecorators
- 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.
Earlier Releases
Cumulative notes through NUnit 2.2.10 are available
here