Environment: ant 1.7.1, junit4.4 

 

We lost log4j logging output (eg. log.debug) in the <system-out> section
of the XML files when we switched to perBatch forkmode. [perBatch
forkmode helps us greatly with performance of the tests.] Actually, the
FIRST test case that runs includes the log4j logging output but all
others after that do not. Note that System.out.println's always appear
in the xml files, just not log.debug.

 

Below is target from the build.xml file. If I remove the
'forkmode="perBatch"' the log4j logging output works fine. Any ideas how
to get logging with forkmode? Anyone using forkmode and getting the
logging output (ie it's just me :-)) 

             

 

<target name="testI" depends="setUpInstrument,build" description=""   >

    <taskdef classpathref="cobertura.classpath"
resource="tasks.properties"/>

    <junit printsummary="yes" haltonerror="false"
failureproperty="junit_test_failed" forkmode="perBatch" maxmemory="512m"
>

                        

        <sysproperty key="net.sourceforge.cobertura.datafile"
file="${base.dir}/cobertura.ser" />

        <classpath refid="cobertura.classpath" />

        <classpath>

            <pathelement path="${FmFileUrlMap.jar.file}" />

            <pathelement path="${GiJpaAbCd.jar.file}" />

            <pathelement location="${AllTests.path}"/>

            <pathelement path="${GiAdapterI.jar.file}" /> 

            <pathelement path="${local.classpath}" />

        </classpath>

        <formatter type="xml"/>

            <batchtest fork="yes" todir="${reports.dir}">

            <fileset dir="${AllTests.path}">

                <include name="**/Test*.class"/>

                <not> <filename name="**/*$*"/></not>

            </fileset>

            </batchtest>

      </junit>

      <fail if="junit_test_failed" message="One or more JUnit  tests
failed"/>

</target>    

 

 

Jeff Boring

Orlando, Florida

Reply via email to