<!-- Start the servlet engine, wait for it to be started, run the unit tests, stop the servlet engine, wait for it to be stopped. The servlet engine is stopped if the tests fail for any reason --> <!-- 8080是服务器的端口号,${project.name}-cactified是项目的路径,和上一步的cactifywar 的destfile相对应 --> <runservertests testURL="http://localhost:8080/${project.name}-cactified/ServletRedirector?Cactus_Service=RUN_TEST" startTarget="_StartTomcat" stopTarget="_StopTomcat" testTarget="_Test"/>
<batchtest> <fileset dir="${src.test.dir}"> <!-- Due to some Cactus synchronization bug, the 'unit' tests need to run before the 'sample' tests --> <include name="**/Test*.java"/> <exclude name="**/Test*All.java"/> </fileset> </batchtest> </junit> </target>