logo       

RE: NUnit Extensability: msg#00058

windows.dotnet.nunit.devel

Subject: RE: NUnit Extensability

This is really old - another hung message. (Sign up with your user id,
Jamie!)

Jamie and I have talked about this offline - well we were online, but
offline with respect to this list, anyway. :-)

I don't think that the implementation of extensibility prevents doing an
assembly-level setup and teardown. In fact I know it doesn't, since I've
already done it. The code is in NUnit now, but is not quite complete. See
SetupFixture.cs. It's intended to be used as an assembly level setup and
teardown when the class marked with SetUpFixtureAttribute is outside of any
namespace.

That's not to say we don't have some deficiencies in the extensibility
model, so please let us know what you find as you try it out.

Charlie

> -----Original Message-----
> From: nunit-developer-admin@xxxxxxxxxxxxxxxxxxxxx [mailto:nunit-developer-
> admin@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Jamie Cansdale
> Sent: Friday, November 18, 2005 8:47 AM
> To: nunit-developer@xxxxxxxxxxxxxxxxxxxxx
> Subject: [nunit-developer] NUnit Extensability
>
> Hi folks,
>
> I've recently been experimenting with NUnit's extensibility model. My
> challenge has been to emulate VSTS Unit Testing as fully as possible.
>
> So far I have only hit a single roadblock. This was when it came it
> implement support for [AssemblyInitialize] and [AssemblyCleanup].
> NUnit already supports TestFixture and TestCase extensibility. There
> is however no easy way to augment or replace a TestAssembly suite.
> This would be nessesary in order to override the DoFixtureSetUp/
> DoFixtureTearDown methods and have them call
> [AssemblyInitialize]/[AssemblyCleanup]
>
> I have tried a few different modifications (of nunit.core) to allow
> this extensibility.
>
> 1) Extended TestSuite to include FixtureSetUp/FixtureTearDown events.
>
> I found that implementing [AssemblyInitialize] and [AssemblyCleanup]
> using events created code that felt complex and fragile. The existing
> TestSuite code is easy work with. I wouldn't want to compramise this
> simplicity by adding events.
>
> 2) Extend the ISuiteBuilder interface to include "bool
> CanBuildFrom(Assembly)" and "TestSuite BuildFrom(Assembly)".
>
> At the moment ISuiteBuilder is a simple interface with only two
> methods. There are already many implementations of ISuiteBuilder.
> Extending this interface would force all of these implementations to
> accommodate two new methods the majority don't care about. It would
> also be extra complexity and decisions for future implementers to deal
> with.
>
> 3) Allow types marked with [SuiteBuilder] to implement a new
> IAssemblySuiteBuilder interface.
>
> By allowing [SuiteBuilder] types to implement an optional
> IAssemblySuiteBuilder interface there would be no effect on existing
> implementations. The suite builders that care about creating a custom
> TestAssembly could implement this interface as well as ISuiteBuilder.
>
> Are there any other ways of implementing this functionality that I
> have overlooked?
>
> Thanks, Jamie.
>
> ..
> http://www.testdriven.net
> http://weblogs.asp.net/nunitaddin
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id865&op=ick
> _______________________________________________
> nunit-developer mailing list
> nunit-developer@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/nunit-developer




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise