[Cfunit-public] Multithreaded CFUnit-Ant tasks
Brought to you by:
skorpiun
|
From: SkorPiun <sko...@gm...> - 2005-11-20 05:39:52
|
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=3D"1.0"?>
<project name=3D"CFUnit" default=3D"example" basedir=3D".">
=09<taskdef name=3D"CFUnit" classname=3D"net.sourceforge.cfunit.ant.CFUnit"=
/>
=09
=09<property name=3D"domain" value=3D"http://localhost/" />
=09
=09<target name=3D"example">
=09=09<parallel timeout=3D"6000" threadCount=3D"10">
=09=09=09<CFUnit testcase=3D"${domain}tests/TestCase1.cfc"
=09=09=09 verbose=3D"true" />
=09=09=09<CFUnit testcase=3D"${domain}tests/TestCase2.cfc"
=09=09=09 verbose=3D"true" />
=09=09=09<CFUnit testcase=3D"${domain}tests/TestCase3.cfc"
=09=09=09 verbose=3D"true" />
=09=09=09<CFUnit testcase=3D"${domain}tests/TestCase4.cfc"
=09=09=09 verbose=3D"true" />
=09=09=09<CFUnit testcase=3D"${domain}tests/TestCase5.cfc"
=09=09=09 verbose=3D"true" />
=09=09=09<CFUnit testcase=3D"${domain}tests/TestCase6.cfc"
=09=09=09 verbose=3D"true" />
=09=09</parallel>
=09</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
|