CFCUnit and Ant
I have recently been using CFCUnit for unit testing my ColdFusion components. I have also been using Ant as a build tool.
A few people have recently blogged about being able to run CFCUnit tests from within Ant. This sounded just great, so I started to look around cfcunit.jar file to get me up and running – unfortunately I couldn't find a download location so I have created a copy here for you to download from.
I understand that this code is not yet officially released, but it is available in the CFCUnit CVS repository. Here is a snapshot of the code and build of the ant-cfcunit.jar available today. You will need to download both to get it working:
The CFCUnit code returns an XML page back to the Ant task, so ensure that you have cfsetting showdebugoutput=false for the CFCUnit code to prevent an 'invalid XML' problem from occurring.
A simple Ant build script to use this would be:
<property name="cfcUnitLib" value="d:/data/cfcunit/lib" />
<property name="hostname" value="127.0.0.1" />
<taskdef
name="cfcUnit"
classname="org.cfcunit.ant.CFCUnitTask"
classpath="${cfcUnitLib}\ant-cfcunit.jar" />
<target name="test">
<cfcUnit
hostname="${hostname}"
testcase="com.yourpackage.YourTestComponent"
verbose="true"
haltonfailure="true"
haltonerror="true"
showstacktrace="true" />
</target>
</project>
Many thanks for Paul Kenny for developing CFCUnit and John Paul Ashenfelter for the Ant integration!
For more on CFCUnit and Ant intergation see the posts by Sean Corfield and Chris Scott

I tried this and getting ant error "cfcunit class can not be created...."
Any mapping is required? or to add jar file to class path?
Regards
Kevan
Thanks.
Actually, the error was because "cfcUnit" is diff. than "cfcunit". (camel case)
I got the build.xml file from another blog: http://cdscott.blogspot.com/2006/07/thank-you-paul..., where taskdef defines name as "cfcUnit" and within the target it has reference to "cfcunit".
I hope, this might help someone else...
Thanks.
However, I am not using CFCUnit any longer - now using MXUnit. CFCUnit was great, but MXUnit seems to be getting quite a bit more attention these days. You might like to take a look:
http://mxunit.org/