- PR -

[Ant]junitタスクでsetUpメソッドで例外が発生したときantの実行が進まなくなる

1
投稿者投稿内容
swat
常連さん
会議室デビュー日: 2002/03/21
投稿数: 33
お住まい・勤務地: 埼玉県
投稿日時: 2003-02-19 12:01
swatと申します。

Ant1.5.1、JUnit3.8.1を使用して、antでjunitタスクを実行させています。

http://objectclub.esm.co.jp/eXtremeProgramming/antdoc/PracticeAnt/practice_ant.htmlを参考に、junitタスクを以下のように組みました。

コード:
<target name="runtests" depends="compile">
	<junit printsummary="yes" haltonfailure="no">
		<classpath>
			<pathelement location="${build.classes}"/>
			<pathelement path="${java.class.path}"/>
			<pathelement path="${servlet.jar.path}"/>
			<pathelement path="${catalina.home}/webapps/jtm/WEB-INF/lib/commons-beanutils.jar"/>
			<pathelement path="${catalina.home}/webapps/jtm/WEB-INF/lib/commons-beanutils.jar"/>
			<pathelement path="${catalina.home}/webapps/jtm/WEB-INF/lib/commons-logging.jar"/>
			<pathelement path="${catalina.home}/webapps/jtm/WEB-INF/lib/fileUpload.jar"/>
		</classpath>
		<formatter type="xml"/>
		<batchtest fork="yes" todir="${reports.dir}" haltonerror="no">
			<fileset dir="${src.dir}">
				<include name="**/*Test.java"/>
			</fileset>
		</batchtest>
	</junit>
	<junitreport todir="${reports.dir}">
		<fileset dir="${reports.dir}">
			<include name="TEST-*.xml"/>
		</fileset>
		<report format="frames" todir="${correctreports.dir}"/>
	</junitreport>
</target>



これでantを実行すると、テストクラスのsetUpメソッドで例外が発生した場合、antの実行がそれ以上進まず、junitreportタスクまで進みません。

setUpメソッドで例外が発生したことをjunitreportで記録できるようにしたいのですが、何か設定できることはあるのでしょうか?

ご存知の方がいらっしゃいましたら教えてください。
よろしくお願いします。
_________________
****** swat ******
http://www.h7.dion.ne.jp/~s_wat/
http://d.hatena.ne.jp/swat/
1

スキルアップ/キャリアアップ(JOB@IT)