OK... now my ears are up. What is ANT... get me started there since there are likely several of us that don't know.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Blackburn Sent: Tuesday, November 08, 2005 11:38 PM To: [email protected] Subject: Re: [CFCDev] Executing CFCUnit/CFUnit with ANT (was CF Pro vs Ent) John was right, extending Ant is very nicely documented, kudos to the Ant developers on that. I put together an Alpha version of CFUnit-ant: https://sourceforge.net/project/showfiles.php?group_id=145385 (remember, this is ALPHA, so no guaranties :o) ) I decided, for the first run at this I would just keep it a simple HTTP request to the test case. I think CFCProxy could definitely be used in this, but I figured it would be best to keep it simple for now. There is no documentation yet, but to use it: 1. Download the CFUnit-ant JAR file and place it in your Ant's "lib" directory, probably something like "C:\Program Files\apache-ant\lib" 2. Add this line to your build.xml file: <taskdef name="CFUnit" classname="net.sourceforge.cfunit.ant.CFUnit"/> 3. Inside any target you can now add: <CFUnit testcase="http://localhost/myCFC.cfc" /> That's it! The "testcase" attribute is simply the URL to the CFUnit test case (the CFC that extends the TestCase component). So any tests you want Ant to execute will have to be available on the web site (ie, can't be hidden in a mapped directory). There are ways we can work around that in later version. Here is an example: <?xml version="1.0"?> <project name="SomeProject" default="main" basedir="."> <taskdef name="CFUnit" classname="net.sourceforge.cfunit.ant.CFUnit"/> <target name="main"> <CFUnit testcase="http://localhost/myCFC1.cfc" /> <CFUnit testcase="http://localhost/myCFC2.cfc" /> <CFUnit testcase="http://localhost/myCFC3.cfc" /> </target> </project> If you wanted to get the full use out of this I would suggest using the CVS version of CFUnit, because it supports a better verbose mode for the Ant test cases. Without the verbose you only see a pass/fail (no explanation). If you do downloaded the CVS version, to turn on verbose, simply add the "verbose" attribute to the CFUnit ant tag: <CFUnit testcase="http://localhost/myCFC3.cfc" verbose="true" /> There is plenty more that can be done here, but I figured this would hopefully get the ball rolling, to see how useful people find this feature. I look forward to everyone's feedback Paul Kenney, As CFUnit-Ant stands right now, it would not be at all difficult to set up CFCUnit for this too. If your interested, just shoot me an email and we can figure out what would need to be done. --------------------------------- Rob Blackburn http://www.rbdev.net ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
