cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manicardi Roberto" <>
Subject Pipeline testing
Date Wed, 14 Jun 2006 10:16:28 GMT
Hi to all!

I'm new to cocoon and I'm trying to find the ways to do unit testing on
my cocoon project.

I found how to test a single component (generator,matcher,action and
selector) with SitemapComponentTestCase.

I also found how to test the webapp with HtmlUnitTestCase.

I'm now trying to find how to test a single pipeline without using
HtmlUnit. The requirement to use HtmlUnit is to have a webapp up and
running in an application/servlet container. I would like to test a
pipeline without doing any deploy of the webapp. What  I need is a
testing framework that create a mock cocoon context in which I can run
my pipeline, so if I have this sample sitemap:



<map:sitemap xmlns:map=""



            <map:match pattern="file/**">








I would like to write a unit test like this:


public class SamplePipelineTest extends MockCocoonContextTestSuite{


            private expectedFilePipelineOutput = "";


            public void setUp(){

                        // set up mock cocoon context




            public void testFilePipeline(){


                        String cocoonUrl="cocoon:/file/xxx";

                        Parameters parameters = ....









My question is: does anybody knows if it's possible and how to do this
kind of test?



Thank you and bye!

Roberto Manicardi



View raw message