cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Re: [RT] Unit testing and CocoonUnit
Date Tue, 04 Nov 2003 09:41:37 GMT
Bertrand Delacretaz wrote:

> Hi Upayavira,
> This looks real good, having a specialized testing framework will 
> certainly help improving our test traceability!


> I just have one small thing to add:
>> ...CocoonUnit would use the CocoonBean to pass requests to Cocoon. 
>> The bean would prepare an Environment (maybe even an 
>> HTTPEnvironment), and would place an empty ArrayList into the object 
>> model with a key of UNIT_TEST_XML...
> Instead of an ArrayList you might want to put a custom object there 
> (CocoonUnitContext?), for example to allow the testing code to specify 
> options later on, like "don't store steps 1 and 4 of the pipeline".

That makes sense. I'll do it that way.

>> ...Conclusion
>> ----------
>> Unit testing helps to provide reliable code. Unit testing in a Web 
>> environment is not always straightforward as your 'units' aren't 
>> always clearly defined. With Cocoon, however, stages in a pipeline 
>> can be considered to be 'units', and therefore could be tested 
>> independently of each other. Adding a CocoonUnit to the Cocoon 
>> codebase would further extend Cocoon's ability to be used in 
>> substantial web environments where automated testing is crucial to 
>> success.
> +1000
>> What do you all think?
> +1000 again!

Glad you like it. Now all I've got to do is get it working!

Regards, Upayavira

View raw message