Hello, A recommendation for NUnit 2 users:
While waiting for the NUnit 2 integration, use the <exec/> task to run your tests. The effect on the build result will be the same: if a test fails, the build will fail. Example: ... <exec basedir="nunit-dir" program="nunit-console.exe" commandline="/assembly:MyTests.dll" /> ... Best regards, Bernard -----Original Message----- From: Simpson Chris, Sale [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 17, 2002 11:40 AM To: '[EMAIL PROTECTED]' Subject: RE: [Nant-users] Using NUnit Task As far as I know, the NAnt only supports NUnit 1.1. The attribute based tests using [TestFixture] and [Text] were only introduced into NUnit 2.0. I haven't checked the NAnt CVS for a while - I'm still using 0.7.9.0 released back in June so I don't know if this has been changed. I've worked around this by writing a wrapper program that shells out to NAnt - if the build was successful then I shell out to NUnit and run the tests. Hope this helps, Chris -----Original Message----- From: Mike Ratliff [mailto:[EMAIL PROTECTED]] Sent: 15 October 2002 21:14 To: '[EMAIL PROTECTED]' Subject: [Nant-users] Using NUnit Task I am trying to get NAnt and NUnit working in together and experiencing a problem. After sifting through the NAnt unit test source, it appears that people are using the concept of an AllTests class that examines a given assembly for types that inherit from TestCase. Is that the only way to get Unit tests to function under NAnt or will the test cases that I have using attributed based declaration [TestFixture] and [Test] be able to work somehow? I ask this because I have a series of tests that work perfectly when executed from the NUnit GUI or console, but when I try to run the NUnit task, I get: BUILD FAILED C:\Impact\impact.build(-1,-1): Error running unit test. Object reference not set to an instance of an object. Try `NAnt -help' for more information. Any light on this error or if I am thinking about the problem from the correct angle would help. Mike ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ ------------------------------------------------------- This sf.net email is sponsored by: viaVerio will pay you up to $1,000 for every account that you consolidate with us. http://ad.doubleclick.net/clk;4749864;7604308;v? http://www.viaverio.com/consolidator/osdn.cfm _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users