|
Mailing Lists
|
Home /
Groups /
CFUnit
Multithreaded CFUnit-Ant tasks
Author: SkorPiun
Short Link: http://www.houseoffusion.com/groups/cfunit/thread.cfm/threadid:712#2034
Ant experts would probably not find this a very big deal, but today I
found the ant parallel command. I found this as I was about to upgrade
CFUnit-Ant to multithreaded, but now I don't need too. Just wrap your
CFUnit tasks in parallel tags and the tasks will run asynchronously.
For example:
<?xml version="1.0"?>
<project name="CFUnit" default="example" basedir=".">
<taskdef name="CFUnit" classname="net.sourceforge.cfunit.ant.CFUnit"/>
<property name="domain" value="http://localhost/" />
<target name="example">
<parallel timeout="6000" threadCount="10">
<CFUnit testcase="${domain}tests/TestCase1.cfc"
verbose="true" />
<CFUnit testcase="${domain}tests/TestCase2.cfc"
verbose="true" />
<CFUnit testcase="${domain}tests/TestCase3.cfc"
verbose="true" />
<CFUnit testcase="${domain}tests/TestCase4.cfc"
verbose="true" />
<CFUnit testcase="${domain}tests/TestCase5.cfc"
verbose="true" />
<CFUnit testcase="${domain}tests/TestCase6.cfc"
verbose="true" />
</parallel>
</target>
</project>
This is especially good if you integrate CFUnit-Ant into CFEclipse so
that they are ran automatically.
--
Rob Blackburn
http://www.rbdev.net
|
May 19, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||