Charlie Poole
2008-04-05 03:53:24 UTC
Hi All,
Now that 2.4.7 is out - and seems to have solved the performance issues with
apps that make heavy use of log4net - I've been able to settle down and
focus
on 2.5 once again. This note is a braindump of what has gone into 2.5 so
far. You can get the code from CVS following the instructions at
http://nunit.org/?p=howtos or wait for a snapshot, which shouldn't be too
long now.
BTW, CVS was messed up for a few days but it's OK now. Thanks to Andreas
for pointing out some of the problems.
WHAT'S DONE FOR 2.5
Build tools are updated: NAnt to 0.86 Beta 1 and Wix to 2.0.5085.
The Visual Studio solutions and projects are now in a directory tree
that is parallell to the source tree. This elimates problems where
the VS2003 and VS2005 builds were interfering with one another and
makes room for VS2008 to be added. The downside is that it's easy
to mess up and save a new sourcefile in the wrong place: they all
belong in the src directory, not in the solutions directory.
A number of obsolete classes and methods have been removed. For
example, the IAsserter-based framework extensibility approach is no
more and the old Assertion class is gone.
The syntax around Is, Has, etc. is now in the namespace
Syntax.CSharp, leaving room for other languages to have their
own stuff.
Daaron's DirectoryAssert in the framework. I moved some of it to
some new constraints, leaving the class itself as only a facade.
We want to do things that way in the future because the
constraints can be used in lots of different ways.
My own Path constraints have been added to the framework, but
without adding a "classic" style assert. I did add syntax
support with Is.SamePathAs and Is.SamePathOrUnder.
Anthony's XmlConstraint has been added to the framework
extensions assembly. It's only present in the .NET 2.0
build - the first time we have had a functional difference
between the builds.
NUnit now (again actually) distinguishes between Errors
and Failures. This is shown in the summary reports in
both runners. In the actual code, there are still a few
places where "Failure" means either of these, so watch
out if you work in the code.
Both the Gui and the console now display more detailed
summary info: errors, failures, not runnable, ignored
and skipped tests. While not-runnable (invalid) tests
are not counted as errors, they display in red in the
gui anyway so that they will get your attention.
Test, SetUp and TearDown methods may now be static.
Test methods may have arguments (if you provide them)
and return values. There are two new attributes for
specifying test data: TestCase and DataSource.
TestCase provides inline arguments and may also specify
an expected exception, expected return value, test name
and description.
DataSource may take a string or a Type. A string is
the name of a static property returning an IEnumerable.
A Type must contain such a property - the first one
found is used.
In either case, the IEnumerable should return either
an object array - if only args are provided - or
an object with properties similar to those of the
TestCase attribute. This allows the provider to
supply a return value, expected exception, etc.
TestCase and DataSource may be mixed on a method.
The console now creates it's output summary separately
from the xml file so the /Transform option no longer
makes any sense and has been removed.
A new extension point "ParameterProviders" is available
for addins that provide test case data to paramterized
methods.
The MaxTime from the NUnit samples is now in the
extensions assembly. It has been improved and tested.
Andreas' RowTest extension, which was incorporated
in the 2.4.7 release, is still in 2.5. Andreas will
be making changes so that it uses the new extesion
point.
I think we are at a point where a preliminary
release of some kind is called for. After that...
WHAT REMAINS TO DO
I don't know the status of Pablo's work to get pNunit
to work with 2.5 and we will need to reach some
decisions about how to manage the bundling. Pablo?
I owe Rinat some feedback on his work, which involves
launching NUnitLite tests on a device under NUnit
control. This seems like a big deal for the future
but I don't know if it can fit into the 2.5 timeframe.
I'm looking at Gary's Theory extension to see if it
fits into this timeframe.
My own next big effort will be to add generic support
to the .NET 2.0 version of the framework. I've already
added a bunch of tests for NullableTypes and they mostly
worked!
A second level of .NET 2.0 support will be to make
use of some improvements in reflection to provide more
efficient loading in the 2.0 builds.
Charlie
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Now that 2.4.7 is out - and seems to have solved the performance issues with
apps that make heavy use of log4net - I've been able to settle down and
focus
on 2.5 once again. This note is a braindump of what has gone into 2.5 so
far. You can get the code from CVS following the instructions at
http://nunit.org/?p=howtos or wait for a snapshot, which shouldn't be too
long now.
BTW, CVS was messed up for a few days but it's OK now. Thanks to Andreas
for pointing out some of the problems.
WHAT'S DONE FOR 2.5
Build tools are updated: NAnt to 0.86 Beta 1 and Wix to 2.0.5085.
The Visual Studio solutions and projects are now in a directory tree
that is parallell to the source tree. This elimates problems where
the VS2003 and VS2005 builds were interfering with one another and
makes room for VS2008 to be added. The downside is that it's easy
to mess up and save a new sourcefile in the wrong place: they all
belong in the src directory, not in the solutions directory.
A number of obsolete classes and methods have been removed. For
example, the IAsserter-based framework extensibility approach is no
more and the old Assertion class is gone.
The syntax around Is, Has, etc. is now in the namespace
Syntax.CSharp, leaving room for other languages to have their
own stuff.
Daaron's DirectoryAssert in the framework. I moved some of it to
some new constraints, leaving the class itself as only a facade.
We want to do things that way in the future because the
constraints can be used in lots of different ways.
My own Path constraints have been added to the framework, but
without adding a "classic" style assert. I did add syntax
support with Is.SamePathAs and Is.SamePathOrUnder.
Anthony's XmlConstraint has been added to the framework
extensions assembly. It's only present in the .NET 2.0
build - the first time we have had a functional difference
between the builds.
NUnit now (again actually) distinguishes between Errors
and Failures. This is shown in the summary reports in
both runners. In the actual code, there are still a few
places where "Failure" means either of these, so watch
out if you work in the code.
Both the Gui and the console now display more detailed
summary info: errors, failures, not runnable, ignored
and skipped tests. While not-runnable (invalid) tests
are not counted as errors, they display in red in the
gui anyway so that they will get your attention.
Test, SetUp and TearDown methods may now be static.
Test methods may have arguments (if you provide them)
and return values. There are two new attributes for
specifying test data: TestCase and DataSource.
TestCase provides inline arguments and may also specify
an expected exception, expected return value, test name
and description.
DataSource may take a string or a Type. A string is
the name of a static property returning an IEnumerable.
A Type must contain such a property - the first one
found is used.
In either case, the IEnumerable should return either
an object array - if only args are provided - or
an object with properties similar to those of the
TestCase attribute. This allows the provider to
supply a return value, expected exception, etc.
TestCase and DataSource may be mixed on a method.
The console now creates it's output summary separately
from the xml file so the /Transform option no longer
makes any sense and has been removed.
A new extension point "ParameterProviders" is available
for addins that provide test case data to paramterized
methods.
The MaxTime from the NUnit samples is now in the
extensions assembly. It has been improved and tested.
Andreas' RowTest extension, which was incorporated
in the 2.4.7 release, is still in 2.5. Andreas will
be making changes so that it uses the new extesion
point.
I think we are at a point where a preliminary
release of some kind is called for. After that...
WHAT REMAINS TO DO
I don't know the status of Pablo's work to get pNunit
to work with 2.5 and we will need to reach some
decisions about how to manage the bundling. Pablo?
I owe Rinat some feedback on his work, which involves
launching NUnitLite tests on a device under NUnit
control. This seems like a big deal for the future
but I don't know if it can fit into the 2.5 timeframe.
I'm looking at Gary's Theory extension to see if it
fits into this timeframe.
My own next big effort will be to add generic support
to the .NET 2.0 version of the framework. I've already
added a bunch of tests for NullableTypes and they mostly
worked!
A second level of .NET 2.0 support will be to make
use of some improvements in reflection to provide more
efficient loading in the 2.0 builds.
Charlie
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone