[AntUnit] Can I write the <logcontent/> to a file?

View: New views
2 Messages — Rating Filter:   Alert me  

[AntUnit] Can I write the <logcontent/> to a file?

by Keith Hatton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
 
I'm trying to use the AntUnit framework to test some custom Ant tasks.
Unfortunately it's proving very much a black box, and when a test fails
I can't find any Ant log for the test case. I've read the AntUnit
documentation on the <logcontent/> resource, and I obviously didn't
fully understand it.
 
I've tried the following within my test case:
                <concat destfile="antunit.log">
                    <au:logcontent/>
                </concat>

but that doesn't produce any log at all, there is no antunit.log file.
 
If I try the same code within my <antunit> task in the main build file,
the build fails, stating that <concat> cannot be used within the
<antunit> task.
 
What is the right way to get generic access to the log of the test case?
 
Thanks
Keith
 
 

Axiom Systems Limited is a limited company registered in England and
Wales. Registered number: 2358771. Registered office: One Forbury
Square, The Forbury, Reading, Berks RG1 3EB

 

Re: [AntUnit] Can I write the <logcontent/> to a file?

by Stefan Bodewig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 11 Jul 2008, Keith Hatton <khatton@...> wrote:

> Hi all,
>  
> I'm trying to use the AntUnit framework to test some custom Ant
> tasks.  Unfortunately it's proving very much a black box, and when a
> test fails I can't find any Ant log for the test case. I've read the
> AntUnit documentation on the <logcontent/> resource, and I obviously
> didn't fully understand it.
>  
> I've tried the following within my test case:
>                 <concat destfile="antunit.log">
>                     <au:logcontent/>
>                 </concat>

This should work when used inside the build file that is containing
the tests and inside a target that is currently being executed.

AntUnit svn trunk extends the listener concept so that listeners now
receive the log output of the project under test as well.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...