ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Spencer A Marks <sma...@digisolutions.com>
Subject Re: Junit output file redirection
Date Sun, 25 Feb 2001 19:43:33 GMT
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