Did anyone use 'batchtest' of ant's junit task?

Did anyone use 'batchtest' of ant's junit task?

Post by krish.. » Sat, 16 Dec 2000 01:12:48



Hi,
Did anyone use 'batchtest' of ant's junit task?

I'm using junit batchtest to run all the files **Test*.java using pattern
matching. Ant is running junit on these files and logging the test results to
files named TEST-name.txt for each matching file in the directory.

Suppose if there are 3 matching files SinpleTest.java, VectorTest.java, and
MoneyTest.java, the results are collected in 3 files TEST-SimpleTest.txt,
TEST-VectorTest.txt, and TEST-MonetTest.txt.

Is there a way to collect the results of all the tests in a single
"results.txt" file instead of ant creating one results file for each matching
file?

Ant is not allowing me to put the attribute "outfile=results.txt" either in
the 'fileset' or in the 'batchtest' tags.

Please help!  Thank You so much!

regards,
Kris

My build file is given below:

<?xml version="1.0"?> <project name = "Ant_Test" default="test" basedir=".">
<property name="classpath"
value=".;C:\jdk1.3\jre\lib\rt.jar;C:\jdk1.3\jre\lib\jaws.jar;C:\jdk1.3\jre\li
b\i18n.jar;C:\jdk1.3\lib\tools.jar;C:\junit3.2\j
unit.jar;C:\JavaWork\.;C:\jBoss\examples\interest\.;C:\junit3.2\.;C:\ant\lib\
ant.jar;C:\ant\lib\jaxp.jar;C:\ant\lib\pars
er.jar;C:\ant\lib\optional.jar;C:\ant\.;" />

<property name="srcdir" value="ant" />

<target name="test">
<junit printsummary="yes" haltonfailure="no">

<classpath>     <pathelement location="${srcdir}" />
                <pathelement path="${classpath}" />
</classpath>

<formatter type="plain" /> <!-- <test name="junit.samples.SimpleTest"
haltonfailure="no" outfile="Test_results"> </test> -->

<batchtest fork="yes">
        <fileset dir="${srcdir}" excludes="**\src\**">
                <include name="**/*Test*.java" />
                <exclude name="**/AllTests.java" />

        </fileset>

</batchtest>

</junit>

Sent via Deja.com
http://www.deja.com/

 
 
 

Did anyone use 'batchtest' of ant's junit task?

Post by Stefan Bodewi » Sat, 16 Dec 2000 18:59:28



> Is there a way to collect the results of all the tests in a single
> "results.txt" file instead of ant creating one results file for each
> matching file?

Not at the moment. It is one the TODO list but I know the author of
the <junit> task is quite busy now 8-) so if you want to improve it,
I'm sure contributions will be more than welcome.

Stefan

 
 
 

Did anyone use 'batchtest' of ant's junit task?

Post by krish.. » Sun, 17 Dec 2000 02:00:32


Hi Stefan,
Thank you for the information.
regards,
Kris

Quote:> > Is there a way to collect the results of all the tests in a single
> > "results.txt" file instead of ant creating one results file for each
> > matching file?

> Not at the moment. It is one the TODO list but I know the author of
> the <junit> task is quite busy now 8-) so if you want to improve it,
> I'm sure contributions will be more than welcome.

> Stefan

Sent via Deja.com
http://www.deja.com/
 
 
 

1. Did anyone use Ant's junit task?

Did anyone use Ant build tool's built in Junit task?

I'm running some JUnit tests (Junit 3.2) on a java application and I would
like to log the Junit test results to a file. I came to know that Jakarta's
ant has buit in "junit tasks" using which I can print the results to a file.
I tried to use the junit task in my build.xml file but I'm getting an error
"Ant couldn't find junit in it's task definitions".  I'm using Ant1.2 -binary
editon.

Any help/sugestions please?
Thank you,
-kris

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Cyrix 686 150 (120 Mhz) Question???

3. Can't get build to fail with junit, ant, and cruisecontrol

4. vi editor FAQ (Frequently Asked Question List), Part 2/2

5. JUnit 3.7 and Ant 1.4 Property definitions - don't work

6. Looking for Bill Williams / Dan Gorlin / Greg Johnson

7. Linking 'DOS' device name to 'SetupDi....' functions

8. Using AVI's for animated backdrops?

9. 95 hangs on 'Restart' or 'Restart in MS Dos' , help

10. ANYONE KNOWS DO'S AND DON'T DO'S OF DIRECTX SDK EULA

11. Using 'try' and 'catch'?

12. 'initializing' : truncation from 'const double' to 'float' warning

13. Converting '->' to '.' using a template...