ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: [Ant Java Source] How to get some build.xml params?
Date Mon, 11 Feb 2008 10:15:01 GMT
rigel wrote:
> Thank You for the advice, I'll do it :working: :-)
> The "problem" is that I'd like to print out additional test cases info into
> the final Junit report, something like description,  input data&format and
> more but I haven't found a solution to do it directly from the JUnit
> library.
> So now I accompained all test case methods with an optional wired
> description built upon a custom annotation class tag.
> Something to use later during JUnit report generation for printing out some
> aggregated data used for testing (input data and format, objectives and
> more). A more sophiticated way to do this, which I'd like to do, would be to
> getting this info directly from test method associated javadoc taglet.
> This sample report shows what I am working on: 
> 6_TestBigRationalFraction.html 
> Pratically I would like that JUnit report generator was unaware of specific
> might only process this info as an additional tag to nest into  for later
> XSLT processing on customized report generator stylesheet. For this I
> believe that I need a way to pass additional params from build.xml ...
> James Abley wrote:
>> On 08/02/2008, rigel  wrote:
>>> Hello Everyone,
>>> I am currently working on some JUnit task sources, precisely on
>>> "XMLJUnitResultFormatter" and "JUnitVersionHelper" of the library named
>>> "ant-junit.jar".
>>> I have patched XMLJUnitResultFormatter to support additional test case
>>> information passed by a custom annotation made up of three params, BUT
>>> currently all annotation's params and annotation class name are brutally
>>> wired into the code (for successive introspection). So I created an
>>> annotation and a custom  "XMLJUnitResultFormatter" that works only with
>>> the
>>> following params and annotation classname:
>>> @TestDescriptor(title="title",desc="desc",input={"0","1","2"})
>>> Substantially now I would like to pass "TestDescriptor" and
>>> "title,desc,input" directly by the Ant build file to allow the use of any
>>> available custom annotation, unfortunately I know only a way to do it,
>>> opening the build.xml DOM and getting by myself the values because I am
>>> not
>>> able to figure out if it exists a static helper class that can do this
>>> easily. Anyone can help me or point me on the right direction?

I'd do it on the side by having people set ant properties before your 
task runs. Or extend the various ant tasks with more work. Trying to 
parse the dom yourself is going to get you in trouble.

I've been thinking a bit about enhancing Ant's test reports, but nothing 
is implemented


Steve Loughran        
Author: Ant in Action 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message