You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stephan Michels <st...@apache.org> on 2003/04/17 13:32:25 UTC

Testcases for Cocoon components

Hi,

I tried to make some universal testcases for Cocoon components. I
first started with testcases for generators and transformers. These
testcases makes it easy to test the components outside of Cocoon.
And also started to make some mock clases for the environment. I was
inspired by the Strutstestcase project, which allows to test
every aspect without a servlet container.

http://sourceforge.net/projects/strutstestcase/

But my current problem is that the abstract test classes are found
in src/test, and used in src/blocks/chaperon/test. This will cause
problems with the Gump, because the classes couldn't be found.
One way to solve that issue is to use a block for these classes, but
this will not be a block in the common sense :-/

Perhaps anyone have a better idea? Perhaps I'm the only one, who think
testcases for components are important?!

Thoughts?

Stephan Michels.

_______________________________________________________________________
         Stephan Michels               EMail: stephan@apache.org
         ICQ: 115535699                Tel: +49-030-314-21583
----+----|----+----|----+----|----+----|----+----|----+----|----+----|-|


Re: Testcases for Cocoon components

Posted by Torsten Curdt <tc...@dff.st>.
>>Regarding the classes: I think testing should be handled explicitly in
>>the build system. Just like the core - no block.
> 
> 
> Thanks Thorsten and Bertrand,

without the "h" ;)

> I would first start with smallest piece, and then we could add testcases
> for complete pipelines. It shouldn't be difficult to write a
> PipelineTestCase.
> 
> But anyway, the current problem is that we doesn't build a jar for the
> test folder. So we can't get them into the classpath of other gump
> projects, like for a block.
> 
> Does it make a sense if we build a jar from the test folder? No, because
> there also normal testcases, which aren't reusable.

Sorry, didn't get your argument. I think it's totally ok to build
a testcase jar where all the testcase classes will end up. IMHO it
should include the general testcase classes and maybe all the block's
testcases. Or do we want to be able to even drop in block testcase's
at runtime?? Hm... would be cool - you could check at runtime if the
block works on that particular installation - but might be FS.
--
Torsten


> 
> So, I don't know ?-|
> 
> 



Re: Testcases for Cocoon components

Posted by Stephan Michels <st...@apache.org>.

On Thu, 17 Apr 2003, Torsten Curdt wrote:

> > Perhaps I'm the only one, who think testcases for components are important?!
>
> Definitly NOT!
>
> Only problem is comming up with some good ones :-/ From my experience
> writing useful testcase for such complex components can be quite a
> challange.
>
> Regarding the classes: I think testing should be handled explicitly in
> the build system. Just like the core - no block.

Thanks Thorsten and Bertrand,

I would first start with smallest piece, and then we could add testcases
for complete pipelines. It shouldn't be difficult to write a
PipelineTestCase.

But anyway, the current problem is that we doesn't build a jar for the
test folder. So we can't get them into the classpath of other gump
projects, like for a block.

Does it make a sense if we build a jar from the test folder? No, because
there also normal testcases, which aren't reusable.

So, I don't know ?-|


Re: Testcases for Cocoon components

Posted by Torsten Curdt <tc...@dff.st>.
> Perhaps I'm the only one, who think testcases for components are important?!

Definitly NOT!

Only problem is comming up with some good ones :-/ From my experience 
writing useful testcase for such complex components can be quite a 
challange.

Regarding the classes: I think testing should be handled explicitly in 
the build system. Just like the core - no block.

my 2 cents
--
Torsten


Re: Testcases for Cocoon components

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
Le Jeudi, 17 avr 2003, à 13:32 Europe/Zurich, Stephan Michels a écrit :

> ...Perhaps I'm the only one, who think
> testcases for components are important?!

You're not, test cases are GREAT in my opinion.
Thanks for your work!

-Bertrand

--
   Bertrand Delacretaz (codeconsult.ch, jfor.org)
   XML, java, XSLT, Cocoon, FOP, mentoring/programming/teaching