cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: cvs commit: cocoon-2.1/tools/targets test-build.xml
Date Thu, 29 Apr 2004 09:04:52 GMT
On 29.04.2004 10:57, Ugo Cei wrote:

>>   Modified:    tools/targets test-build.xml
>>   Log:
>>   output test results into files, create a nice junit report (= HTML) 
>> out of it;
>>   no longer "haltonfailure" for the tests (we would not get the 
>> report), if we need a failing build we can use "failureproperty"
> The HTML report certainly looks nice and I'm 100% for it.
> But not halting on failure looks like a risk, IMHO. We already have 
> commits done without running the tests and I'm afraid that the few 
> people that do run tests will suppose they succeeded just because they 
> see "BUILD SUCCESSFUL" at the end, and missing a single "FAILED" in the 
> output is all too easy.
> Couldn't we have two targets for this? "Build test" will work just as 
> before and "build testreport" will create the HTML report and not halt.
>     WDYT?

Exactly therefore I wrote "if we need a failing build we can use 
'failureproperty'". The junit task [1] has an attribute failureproperty, 
which stores the name of property that is set if one of the tests failed:

<junit failureproperty="tests.failed">

After generating the report we can simply do:

<fail if="test.failed" message="Tests failed, have a look at the HTML 
report at ${build.test.output} for the details."/>   [2]

or something like that.



View raw message