ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <sbaill...@imediation.com>
Subject RE: Junit output file redirection
Date Mon, 26 Feb 2001 09:36:20 GMT
Use the todir attribute

<batchtest todir="./somedir">
...

or 

<test todir="./">
..

This is a limitation in Ant 1.2, this is however supported in Ant 1.3.

You can download from here
http://jakarta.apache.org/builds/jakarta-ant/release/v1.3-b3/

Please report bugs to
http://nagoya.apache.org/bugzilla/

-- 
 St├ęphane Bailliez 
 Software Engineer, Paris - France 
 iMediation - http://www.imediation.com 
 Disclaimer: All the opinions expressed above are mine and not those from my
company. 



> -----Original Message-----
> From: Spencer A Marks [mailto:smarks@digisolutions.com]
> Sent: Sunday, February 25, 2001 8:44 PM
> To: ant-user@jakarta.apache.org; royston@pressroom.com
> Subject: Re: Junit output file redirection
> 
> 
> 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" <royston@pressroom.com> 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:smarks@digisolutions.com]
> > Sent: Friday, February 23, 2001 7:00 PM
> > To: ant-user@jakarta.apache.org
> > 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.
> 

Mime
View raw message