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/10 10:42:24 UTC

testing (was Re: [cforms] widget values: set, get, validate, readfromrequest, parse, fireEvents,... generateSAXEvent)

Il giorno 09/apr/04, alle 16:11, Marc Portier ha scritto:

>
>
> Ugo Cei wrote:
>> Il giorno 09/apr/04, alle 14:16, Marc Portier ha scritto:
>>> more?
>> Write tests, maybe? ;-)
>
> agree, in fact I'm just looking at most of the samples being broken 
> ATM (hoping it's only local)
>
> do you have any suggestions on a sensible template for those tests?

I'm not sure I understand what you mean by "template" here. When I did 
a contribution to Woody, I wrote a small set of Junit test cases for it 
(see src/blocks/forms/test/org/apache/cocoon/forms/datatype), extending 
ExcaliburTestCase. Another approach is to use Anteater. I don't think 
there's a generic template that you can reuse easily.

<rant>
Actually, I was just pointing out that, without a comprehensive suite 
of tests, it's very hard to keep sanity in our codebase and understand 
what's going on. I might go as far as to suggest that we shouldn't 
accept new components and blocks without a comprehensive accompanying 
test suite. And the same goes for refactorings and bugfixes on stable 
blocks and the core.

I know I am guilty myself of occasional sloppiness, but when I see an 
entire new "kernel" for our next generation container being committed 
without a single test case, I cannot but feel a little worried.
</rant>

	Ugo


Re: testing (was Re: [cforms] widget values: set, get, validate, readfromrequest, parse, fireEvents,... generateSAXEvent)

Posted by Marc Portier <mp...@outerthought.org>.

Ugo Cei wrote:

> Il giorno 09/apr/04, alle 16:11, Marc Portier ha scritto:
> 
>>
>>
>> Ugo Cei wrote:
>>
>>> Il giorno 09/apr/04, alle 14:16, Marc Portier ha scritto:
>>>
>>>> more?
>>>
>>> Write tests, maybe? ;-)
>>
>>
>> agree, in fact I'm just looking at most of the samples being broken 
>> ATM (hoping it's only local)
>>
>> do you have any suggestions on a sensible template for those tests?
> 
> 
> I'm not sure I understand what you mean by "template" here. When I did a 

I meant 'pattern', way of working,
hopefully described in a wiki page :-)

> contribution to Woody, I wrote a small set of Junit test cases for it 
> (see src/blocks/forms/test/org/apache/cocoon/forms/datatype), extending 
> ExcaliburTestCase. Another approach is to use Anteater. I don't think 
> there's a generic template that you can reuse easily.
> 

too bad, having some proclaimed guidelines/cookbook-receipes might get 
us past the "I know I should but, I lack the spirit to investigate how I 
should" feeling

-marc=
-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org