<!-- 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>