You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by jl...@household.com on 2002/08/05 22:07:15 UTC

Testing Optional Ant Tasks

Are there any extensions or utility classes for testing tasks in the ant
project?  I know that junit is being used, but I expect there are a few
subclasses of the TestCase class to make testing tasks easier.

In other words, how do I easily execute an ant task within the context of a
junit test?

Is there any place where the answer has already been documented?

James Lee Carpenter
Software Engineer
Household Technical Services
6602 Convoy Court
San Diego, CA 92111

ph: 858-609-2461
email: jlcarpenter@household.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Testing Optional Ant Tasks

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Steve Loughran" <st...@iseran.com>
To: "Ant Developers List" <an...@jakarta.apache.org>
Sent: Monday, August 05, 2002 13:34
Subject: Re: Testing Optional Ant Tasks



> Also, while there *isnt* anything on testing ant tasks in the
> soon-to-be-seminal Java Development with Ant book, there are 5+ pages on
the
> subject in its CVS repository that Erik or I could retrieve, update to the
> latest version of the test classes (it was written against the old one),
and
> then add to the ant documentation.

OK, here is a seven page PDFshowing how to write and test tasks. You should
really read it alongside our book which is apparently shipping as of this
week (!), or look more closely at the ant source and javadocs  which contain
the same information in a different format.

I'm minded to pull this in to the ant docs; it is short and simple enough to
merit this, we just need to pull the test class into its own jar, regress
test the example, clean up and format convert the doc to docbook or similar.

-steve

Re: Testing Optional Ant Tasks

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Erik Hatcher" <ja...@ehatchersolutions.com>
To: "Ant Developers List" <an...@jakarta.apache.org>
Sent: Monday, August 05, 2002 13:09
Subject: Re: Testing Optional Ant Tasks


> Have a look in Ant's CVS tree.  There is a base class, exactly as you
> suspected.  As for being documented - not really, but once you browse
> Ant's source tree in the test cases area you'll get the hang of it
> relatively easily.
>
> And we're here to help if you run into more questions along the way.
>
> Erik
>
>

there is the intent to make the test class a standalone jar for easier of
testing of 3rd party tasks; someone needs to sit down and edit build.xml to
create this.

Also, while there *isnt* anything on testing ant tasks in the
soon-to-be-seminal Java Development with Ant book, there are 5+ pages on the
subject in its CVS repository that Erik or I could retrieve, update to the
latest version of the test classes (it was written against the old one), and
then add to the ant documentation. Same for another out-take: common build
file problems and how to diagnose them.


-Steve


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Testing Optional Ant Tasks

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Have a look in Ant's CVS tree.  There is a base class, exactly as you 
suspected.  As for being documented - not really, but once you browse 
Ant's source tree in the test cases area you'll get the hang of it 
relatively easily.

And we're here to help if you run into more questions along the way.

	Erik


jlcarpenter@household.com wrote:
> Are there any extensions or utility classes for testing tasks in the ant
> project?  I know that junit is being used, but I expect there are a few
> subclasses of the TestCase class to make testing tasks easier.
> 
> In other words, how do I easily execute an ant task within the context of a
> junit test?
> 
> Is there any place where the answer has already been documented?
> 
> James Lee Carpenter
> Software Engineer
> Household Technical Services
> 6602 Convoy Court
> San Diego, CA 92111
> 
> ph: 858-609-2461
> email: jlcarpenter@household.com
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>