ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Bailliez" <>
Subject Re: Problems with junit task
Date Tue, 20 Feb 2001 00:50:39 GMT
----- Original Message -----
From: "Sean Rohead" <>

> I am trying to get the junit task to work.  I've got junit.jar and
> optional.jar in the classpath when invoking ant and am using the following
> junit tag:
>     <junit printsummary="true">
>       <classpath>
>         <path refid="classpath" />
>         <pathelement location="${bin.dir}" />
>         <pathelement location="${tst.dir}" />
>       </classpath>
>       <test name="com.webmiles.Test_All" />
>     </junit>
> This works and gives the following output on the console:
>     [junit] Running com.webmiles.Test_All
>     [junit] Tests run: 119, Failures: 0, Errors: 0, Time elapsed: 2.313
> However, I have searched my entire harddrive for any files called
> and nothing is found.  I even tried to use the outfile property with an
> explicit filename and still nothing.

You are just saying the task to print the summary on the screen. You are not
asking it to write anything on a file. Please review the examples provided
in the documentation, you must use a formatter element for this such as:

<formatter type="plain" />

> Even stranger is when I break my testcases by adding a test which calls
> fail() or assert(false) I get the following error message:
> java.lang.AbstractMethodError
You are obviouslly using Ant 1.2 w/ JUnit 3.5. JUnit changed its interface
on version 3.5 which was released after Ant 1.2. You can upgrade Ant to
1.3b2 (we need bug reports :)

--- cut ---
Ant 1.3, Beta 2 is now available for download and test.

You can download the various components from here

The major changes from the first beta are the reorganization and updating
of the documentation and a number of bug fixes. This build is the release
candidate for Ant 1.3, so please give it a good workout. If you do find
issues, please report them at

--- cut ---

View raw message