Bob,

Thanks for the direction, took me about an hour to figure that out and now my 
test suite is included as part of my nightly builds.

Why did I waste almost a day and half trying to figure this out and should of 
just went to this immediately.

Also using "nunit2report" to format my output nicely (similar to my jUNIT test 
suites) and attaching to an HTML email that is sent out at the end of the 
process.

You the man!

Whatty

Steve Whatmore, MBA, MCP, .NET
Senior Architect
416.598.1241 x245
-------------------------------------------------
PureFacts Financial Solutions
372 Bay Street, Suite 1400
Toronto, Ontario M5H 2W9
416.598.1241 main
888.596.9338 toll free
416.598.9226 fax

www.purefacts.com


PureFacts Financial Solutions is a Lynxdev Company
Please consider the environment before printing this e-mail.
This e-mail may be privileged and/or confidential, and the sender does not 
waive any related rights and obligations. Any distribution, use or copying of 
this e-mail or the information it contains by other than an intended recipient 
is unauthorized. If you received this e-mail in error, please advise me (by 
return e-mail or otherwise) immediately.
Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce 
pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation 
ou copie de ce message ou des renseignements qu'il contient par une personne 
autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce 
courrier électronique par erreur, veuillez m'en aviser immédiatement, par 
retour de courrier électronique ou par un autre moyen.



-----Original Message-----
From: Bob Archer [mailto:bob.arc...@amsi.com] 
Sent: Tuesday, November 03, 2009 1:26 PM
To: Steven Whatmore; nant-users@lists.sourceforge.net
Subject: RE: nANT and nUnit2 integration and running test.

The version nant references is different than the version that you are using in 
your own app. Use the exec task instead of the nunit2 task.

http://www.hanselman.com/blog/CallingNUnitFromNAntPragmatically.aspx

BOb


> -----Original Message-----
> From: Steven Whatmore [mailto:steven.whatm...@purefacts.com]
> Sent: Tuesday, November 03, 2009 1:06 PM
> To: nant-users@lists.sourceforge.net
> Subject: [NAnt-users] nANT and nUnit2 integration and running test.
> 
> Good afternoon,
> 
> I am trying to integrate my unit testing into a nightly build
> process and am having one hell of a time getting the test to run
> successfully.
> 
> My unit test run fine from Visual Studio and using the test runner
> GUI but am receiving the following error when I run it from nANT.
> 
> Failure executing test(s). If you assembly is not built using NUnit
> version 2.2.8.0, then ensure you have redirected assembly bindings.
> Consult the documentation of the <nunit2> task for more
> information.:
> NAnt.Core.BuildException: C:\Projects\PureFees-Net\PureFees-Net
> \PureFees-Net-nUnit.build(14,10):
> Failure executing test(s). If you assembly is not built using NUnit
> version 2.2.8.0, then ensure you have redirected assembly bindings.
> Consult the documentation of the <nunit2> task for more
> information.
> ---> System.IO.FileNotFoundException: Could not load file or
> assembly
> 'PureFees-Net-TestSuite' or one of its dependencies. The system
> cannot find the file specified.
> File name: 'PureFees-Net-TestSuite'
>   at (wrapper xdomain-invoke) NUnit.Core.ProxyTestRunner:Load
> (string)
>   at NAnt.NUnit2.Tasks.NUnit2Task.ExecuteTask () [0x00000]
>   --- End of inner exception stack trace ---
>   at NAnt.NUnit2.Tasks.NUnit2Task.ExecuteTask () [0x00000]
>   at NAnt.Core.Task.Execute () [0x00000]
> 
> The documentation on how to properly configure this is not 100%
> clear.
> 
> The same test runs successfully on the build machine by directly
> loading the project into the GUI but the nANT nUnit2 task does not.
> 
> I have tried many variations of the configuration of the test and
> the nUnit task but with no luck.
> 
> I must be missing something obvious (or not so obvious in this
> case)
> 
> Here is my nANT file
> 
> <?xml version="1.0" ?>
> <project name="Test1" default="solutionTest"
> xmlns="http://nant.sf.net/schemas/nant.xsd";>
> 
>     <property name="basedir" value="${project::get-base-
> directory()}" />
> 
>     <property name="build.debug" value="false" />
>     <property name="project.version" value="0.0.1" />
>     <property name="current.build.dir" value="${basedir}\\build" />
> 
>     <target name="solutionTest">
> 
>         <loadtasks assembly="C:\DEV\Microsoft\nant-0.86-
> beta1\bin\NAnt.Contrib.Tasks.dll" />
> 
>         <nunit2 verbose="true">
>             <formatter type="Xml" />
>             <test assemblyname="Test-Net-TestSuite.dll"
> appconfig="Test-Net-QC.nunit" />
>         </nunit2>
> 
>     </target>
> 
> </project>
> 
> And here is my Test-Net-QC.nunit
> 
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
>     <runtime>
>         <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
>             <dependentAssembly>
>                 <assemblyIdentity name="nunit.framework"
> publicKeyToken="96d09a1eb7f44a77" culture="Neutral" />
>                 <bindingRedirect oldVersion="2.0.6.0"
> newVersion="2.2.8.0" />
>                 <bindingRedirect oldVersion="2.1.4.0"
> newVersion="2.2.8.0" />
>             </dependentAssembly>
>         </assemblyBinding>
>     </runtime>
> </configuration>
> 
> Thanks in advance.
> 
> Whatty
> 
> 
> -------------------------------------------------------------------
> -----------
> Come build with us! The BlackBerry(R) Developer Conference in SF,
> CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market
> and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register
> now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.698 / Virus Database: 270.14.46/2477 - Release Date: 11/03/09 
02:36:00

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to