Thanks for the reply. 

My junit target looks a little different than yours. (I've pasted it
below.) 

I use the backtest attribute so I don't think using 
>        <test name="FileSystemTest" outfile="${test.dir}/TEST" />
will work for me. 

It seems like there's no way to specify the test output directory when using the
batchtest, only with the test attribute. 

Can anyone confirm (or deny) this?

Thanks.  

        <target name = "tests" depends = "compiletests">       
                <junit printsummary = "yes" fork = "no" haltonfailure = "no">       
                     <formatter type = "plain" usefile="false" />       

                        <classpath>           
                                <pathelement location = "${test.dir}"/>           
                                <pathelement location = "${src.dir}"/>           
                                <pathelement path = "${java.class.path}"/>
                                <pathelement path = "${build.tests}"/>           
                                <pathelement path = "${build.dest}"/>       
                        </classpath>         
                        <batchtest fork = "yes">         
                                <fileset dir = "${test.dir}">           
                                        <include name = "**/*Test*.java"/>           
                                        <exclude name = "**/AllTests.java"/>         
                                </fileset>       
                        </batchtest>    
                </junit>  
        </target>  



"Royston McNeill" <[EMAIL PROTECTED]> writes:

> Give this a try...
> 
> 
>   <target name="runtest">
>     <junit printsummary="yes" fork="no" haltonfailure="no">
>        <formatter type="xml" />
>        <classpath>
>            <!-- INCLUDE BUILD DIR PATH FOR TEST RUN -->
>            <pathelement location="${test.dir}" />
>            <pathelement path="${java.class.path}" />
>            <pathelement path="build/testcases" />
>            <pathelement path="${build.dir}" />
>        </classpath>
>        <test name="FileSystemTest" outfile="${test.dir}/TEST" />
>     </junit>
>   </target>
> 
> This will place the output file, which is in the cse an XML file, into the
> test directory as a file name "TEST."
> Hope this helps.
> 
> -----Original Message-----
> From: Spencer A Marks [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 23, 2001 7:00 PM
> To: [EMAIL PROTECTED]
> Subject: Junit output file redirection
> 
> 
> It seems like the only place the JUnit taskdef will write its output (using
> one of
> the default formatters) is in the base directory of the project. Is
> there a way to specify a different directory?
> 
> Thanks.

Reply via email to