You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by David Crossley <cr...@indexgeo.com.au> on 2002/03/03 07:20:23 UTC

Re: Testlet

On Tue, 26 Feb 2002 00:08, Graaf, Edgar de (Fin) wrote:
> Testlet was removed to give JUnit space. Could someone please tell me how I
> can test the components of Cocoon 2. For example if I want to test the
> FileGenerator how can that be done?
> 
> Thank you,
> 
> Edgar

Run "build.sh test" carries out some tests. I gather that these are
rudimentary, but they do their job. I also gather that you can add
your own tests to this infrastructure under src/test/...

-- David Crossley


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Testlet

Posted by Stuart Roebuck <st...@mac.com>.
On Sunday, March 3, 2002, at 06:20 am, David Crossley wrote:

>> Testlet was removed to give JUnit space. Could someone please tell me 
>> how I
>> can test the components of Cocoon 2. For example if I want to test the
>> FileGenerator how can that be done?
>>
>> Edgar
>
> Run "build.sh test" carries out some tests. I gather that these are
> rudimentary, but they do their job. I also gather that you can add
> your own tests to this infrastructure under src/test/...

I'm sitting on a set of mock objects that I use for testing actions, 
generators and translators.  I will get round to refactoring these for 
inclusion in Cocoon once I've got past a few current deadlines.

These mock objects allow you to configure a dummy Cocoon environment 
within which to test components in isolation, so that you can create 
Unit tests for each and run them without having to fire up Cocoon in its 
entirety.

In the case of FileGenerator, it would allow you to pass it an input 
file, then serialize the SAX output stream and compare it against some 
known entity.

Stuart.


            Public Key - 1024D/88DD65AF 2001-11-23 Stuart Roebuck (Adolos)
      Key fingerprint = 89D9 E405 F8B1 9B22 0FA2  F2C1 9E57 5AB1 88DD 65AF
-------------------------------------------------------------------------
Stuart Roebuck                                  stuart.roebuck@adolos.com
Systems Architect                             Java, XML, MacOS X, XP, 
etc.
ADOLOS                                           <http://www.adolos.com/>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org