Author: doogie
Date: Tue Feb 23 15:41:11 2010
New Revision: 915388
URL:
http://svn.apache.org/viewvc?rev=915388&view=revLog:
It's been a rough ride, little ant and junit, but I'm glad you finally
decided to get along.
Here are the issues that I have discovered with junit forkmode=once. If
you set showoutput=on, then you get the stdout/stderr from each test, as
it happens. However, you don't get it nicely delineated. Only a nested
<formatter> does that. However, in forkonce mode, <formatter> will only
capture the stdout/stderr of the *first* test that happens to print
something to those streams; subsequent tests have the output stream
closed. Setting printsummary="on" or "withOutAndErr" never shows test
case failures, so that option is right out.
So, the compromise, is to set showoutput="on", which shows stdout/stderr
output as it happens, then use a <formatter> to get test case result
data, including failures. This means that the stdout/stderr will get
double printed, but only once.
Modified:
ofbiz/trunk/common.xml
Modified: ofbiz/trunk/common.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/common.xml?rev=915388&r1=915387&r2=915388&view=diff==============================================================================
--- ofbiz/trunk/common.xml (original)
+++ ofbiz/trunk/common.xml Tue Feb 23 15:41:11 2010
@@ -109,7 +109,7 @@
<attribute name="build.jar" default="${build.dir}/lib/${name}.jar"/>
<sequential>
<mkdir dir="${build.dir}/test-results"/>
- <junit fork="on" haltonfailure="on" forkmode="once" showoutput="on" printsummary="withOutAndErr">
+ <junit fork="on" haltonfailure="on" forkmode="once" showoutput="on" printsummary="off">
<classpath>
<path refid="junit.class.path"/>
<path refid="test.class.path"/>
@@ -117,6 +117,7 @@
</classpath>
<sysproperty key="net.sourceforge.cobertura.datafile" file="${build.dir}/test-results/cobertura.dat" />
<sysproperty key="ofbiz.home" value="${ofbiz.home.dir}"/>
+ <formatter usefile="false" type="plain"/>
<batchtest>
<filelist refid="test.classes"/>
</batchtest>