私はJUnitを使って単体テストを含むAntプロジェクトを作成しました。JUnit&Ant:詳細なエラーメッセージを画面に表示する方法は?
テストターゲットはようです:私はこのテストを実行すると、それが画面上のようなテストの概要のみ表示し
<target name="test">
<mkdir dir="target/test/reports"/>
<junit printsummary="yes" haltonfailure="yes">
<classpath>
<pathelement location="${test.classes.dir}"/>
<pathelement location="${test.junit.jar}" />
<pathelement path="${classes.dir}"/>
<pathelement path="${java.class.path}"/>
</classpath>
<formatter type="plain"/>
<batchtest fork="yes" todir="${test.reports.dir}">
<fileset dir="${test.src.dir}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
:
Buildfile: F:\test\build.xml
test:
[junit] Running com.mycompany.myproject.myTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.013 sec
[junit] Running com.mycompany.myproject.myTest1
[junit] Tests run: 3, Failures: 1, Errors: 0, Time elapsed: 0.018 sec
BUILD FAILED
F:\test\build.xml:30: Test com.mycompany.myproject.myTest1 failed
Total time: 1 second
ありますが、とにかく私はJUnitのを伝えることができますまたはAntを使用して詳細な結果を画面に表示しますか?
また、Unitテストで何かを画面に書きたい場合、どうすればいいですか?テストでSystem.out.println()を挿入しようとしましたが、画面に何も表示されません。
多くのありがとうございます。