good description of the issue. I'm not as familiar with the issues as Tomas but I do remember the back and forth on the nant list some time ago. I'm more than happy to see NAnt do 'the right thing' with regard to NUnit.
It looks like the NAnt NUnit2TestDomain class is a forked version of TestDomain. If someone from NUnit would like to outline the definitive API to use I'm happy to remove NUnit2TestDomain and get NAnt more in sync with NUnit. I'd like to hear Tomas's opinion as he has more knowledge of the issues and potential backward compatibility problems with existing .build files.
On another note it seems that upgrading to nunit 2.1 means re-compiling all your tests. Trying to use test assemblies compiled against 2.0 gives a 'no tests found in this assembly' error. This is one reason we were holding off making the move to 2.1.
Ian btw I've cc'd nant dev list .
Actually I think it is an issue on both sides.
NUnit works by loading tests in their own AppDomain. This work is mostly encapsulated in the TestDomain class. The original implementation of the nunit2 task in nant used the TestDomain class. There were some issues with that implementation and it was re-written. Unfortunately it was re-written by interfacing at too low a level. These issues were pointed out on the nant development list in Feb. of this year. The interface to TestDomain really hasn't changed. It has been added to but I 'm pretty sure the original interface still exists there are just some new overloads.
Now NAnt starts its own AppDomain just for tests unstead of using NUnit's way of doing it. One of the reassons this was done was due to NUnit's poor documentation of the use of config files while for tests and a NAnt developer believed the only way to have tests see config files was to start up a new AppDomain. NAnt gives more control over the name of the config file that tests use which is nice but I don't believe in using anything through the nunit2 task that nunit does not actually support.
What I really think needs to be done is for NUnit to lock down the API a bit so it is better communicated what should and should not be used. In the end it is open source so if you need to open something back up you always can. Some NAnt developers rightly saw some places to add some features and take more control over what nunit does when run through nant. The problem that causes is that now nant allows you to do things that nunit won't do through the command line. It did this by re-writing some pieces of NUnit. There are obvious cut and pastes with modifications in the NAnt code. That's fine it's open source.
My guess is that only way to make one task compatible with both nunit 2.0 and 2.1 is to interface with TestDomain (possibly with TestRunner but I'd have to look a bit more closely).
I've been using <exec> for most of this year because it was the only way I knew I was only getting nunit features and not added nant functionality. I don't think there is anything wrong with adding functionality I just usually end up running tests in multiple ways so I need consistancy.
This potential probelm was pointed out in this message
http://sourceforge.net/mailarchive/message.php?msg_id=3897292
Another problem with differences between the way nunit runs and nant runs nunit was pointed out here
http://sourceforge.net/mailarchive/message.php?msg_id=3897841
both of these are followed up by a debate between Tomas and I. Tomas had issues with the way NUnit dealt with AppDomains and paths and posted many of them to the nunit list last year. He has many good points. I think I had a good feeling for his issues and talked it over with some nunit users. We decided to leave things largely the way they were in nunit because of the large number of tests it would break when converting from 2.0 to 2.1. . NAnt was intentionally changed to behave differently from NUnit and it was done but copying and pasting some existing NUnit code and modifying it.
Some work is going to have to be done on both sides. NUnit will have to make it more clear what the public non changing (at least in point releases) api is. NAnt probably should start using that api (or really go back to using it).
ThoughtWorks, where being meta-cognitive is something worth thinking about.
*"Charlie Poole" <[EMAIL PROTECTED]>* Sent by: [EMAIL PROTECTED]
09/14/2003 01:46 PM
To: [EMAIL PROTECTED]
cc: Subject: [nunit-developer] Nant/NUnit relationship
Hi All,
Someone has posted an NUnit bug (anonymously) as follows:
> NUnit version 2.1 has broken a relationship with NANT > tool because of changed interfaces. Not sure who's > team suppose to correct this, but it has to be done > shortly.
I'd like to fix this, or help someone associated with Nant fix it on their side. Could anyone with some knowledge of how Nant interacts with NUnit 2.0 please post here or contact me directly? I do plan to look on the Nant site as well.
TIA
Charlie Poole [EMAIL PROTECTED] www.pooleconsulting.com www.charliepoole.org
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ nunit-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nunit-developer
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers