[Mono-dev] ANN: NUnitLite 0.1.0 Released
charlie at pooleconsulting.com
Mon Aug 20 18:55:17 EDT 2007
This is the first release of NUnitLite, a smaller, simpler alternative to
NUnit for resource-limited environments. It is suitable for mobile and
embedded development and also for applications that require the entire
framework to be loaded as part of a plugin.
You may download the release from our CodePlex project page:
As you might guess from the fractional version number, this is alpha-level
software and still has a long way to go. Nevertheless, it has a substantial
portion of NUnit's functionality and runs (i.e. passes all its tests) on the
.NET 1.0, 1.1 and 2.0
.NET CF 1.0 and 2.0
Mono 1.0 and 2.0 profiles
If you have any interest in this product, please give us your feedback. The
preferred place to do so is on the NUnitLite mail list at
For more info, see the readme file, which is appended below.
NUnitLite supports both an attribute-based an an inheritance-based approach
to test identification. Classes marked with the TestFixtureAttribute
represent fixtures and methods with the TestAttribute are test cases.
Alternatively, test fixtures may be created by inheriting from the TestCase
class. In that case, any methods begining with the case-insensitive prefix
"test" are identified as tests.
The SetUp and TearDown attributes are recognized as in NUnit. In methods
inheriting from TestCase, the SetUp and TearDown methods may be overridden
and will be called before and after each test.
A simplified form of the ExpectedExceptionAttribute allows specification of
the type of the expected exception and of an ExceptionHander method, which
is called to evaluate the exception in more detail.
By use of the static Suite property, arbitrary suites of tests may be
manually created. A suite may consist of individual test cases, entire test
fixtures or other suites.
The programmer expresses expected test conditions using the Assert class.
The existing functionality of most current NUnit Assert methods is
supported, but the syntax has been changed to use the more extensible
constraint-based format. The following methods are supported:
NUnitLite supports most of the same built-in constraints as NUnit. Users may
also derive custom constraints from the abstract Constraint class. The
following built-in constraints are provided:
RegexConstraint (not available on compact framework)
Although constraints may be created using their constructors, the more usual
approach is to make use of one or more of the NUnitLite SyntaxHelpers. The
following helpers are provided:
Is: Not, All, Null, True, False, NaN, Empty, Unique, EqualTo, SameAs,
GreaterThan, GreaterThanOrEqualTo, LessThan, LessThanOrEqualTo,
AtLeast, AtMost, Type, InstanceOfType, AssignableFrom,
StringStarting, StringEnding, StringMatching (except compact
Contains: Substring, Item
Has: No, All, Some, None,Property, Length, Count, Member
Tests are loaded as a list of fixtures, without any additional hierarchy.
Each fixture contains it's tests. Tests are executed in the order found,
without any guarantees of ordering. A separate instance of the fixture
object is created for each test case executed by NUnitLite. The embedded
console runner produces a summary of tests run and lists any errors or
NUnitLite is not "installed" in your system. Instead, you should make the
NUnitLite files - those in the src/NUnitLite directory and subdirectories -
part of your own project. If you wish to compile NUnitLite as a separate
assembly, you may do so. Alternatively, make it part of your test project.
In either case, your tests should be created in an exe project, which is run
in order to execute them. If the NUnitLite files are included in the
project, the Main program will locate your tests automatically and execute
them. If you place NUnitLite in a separate assembly, you will need to create
a small stub that starts NUnitLite. For an example of how to do this, take a
look at NUnitLite's own tests.
NUnitLite uses the NUnit.Framework namespace, which allows relatively easy
portability between NUnit and NUnitLite. Test assemblies built using
NUnitLite may be opened using NUnit version 2.4 or later, provided that all
tests are identified using attributes rather than inheritance.
More information about the Mono-devel-list