ok this is what worked for me: test ant target:
<target name="test" depends="test.prepare" description="Run the tests on the defined containers"> <!-- Run the tests --> <cactus warfile="${project.build.dir}/test.war" fork="yes" failureproperty="tests.failed"> <classpath> <path refid="project.classpath"/> <pathelement location="${httpunit.jar}"/> <pathelement location="${nekohtml.jar}"/> <pathelement location="${target.classes.java.dir}"/> <pathelement location="${target.classes.cactus.dir}"/> </classpath> <containerset timeout="180000"/> <formatter type="brief" usefile="false"/> <formatter type="xml"/> <batchtest> <fileset dir="${src.cactus.dir}"> <include name="**/Test*.java"/> <exclude name="**/Test*All.java"/> </fileset> </batchtest> </cactus> </target> test.prepare ant target: <target name="test.prepare" depends="war.myproject,compile.cactus"> <!-- Cactify the web-app archive --> <cactifywar srcfile="${project.build.dir}/${war.file}" destfile="${project.build.dir}/test.war"> <classes dir="${project.build.dir}/test/"/> </cactifywar> </target> so calling the test target doesn't throw the nested exception. Yay! I do have another problem though: Parse error in application web.xml file at jndi:/localhost/coconet/WEB-INF/web.xml java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name ServletRedirector which I might put in a new post. Thanks Petar for your help! nic