You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ugo Cei <ug...@apache.org> on 2004/04/29 10:57:43 UTC

Re: cvs commit: cocoon-2.1/tools/targets test-build.xml

Il giorno 29/apr/04, alle 02:36, joerg@apache.org ha scritto:

> joerg       2004/04/28 17:36:06
>
>   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?

		Ugo


Re: cvs commit: cocoon-2.1/tools/targets test-build.xml

Posted by Joerg Heinicke <jo...@gmx.de>.
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">
  ...
</junit>

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.

Joerg

[1] http://ant.apache.org/manual/OptionalTasks/junit.html
[2] http://ant.apache.org/manual/CoreTasks/fail.html