Cactus new vision
[ vmassol ] 12:29, Monday, 1 December 2003

Currently the Cactus project is a framework to help unit test J2EE components (and mostly Servlet/JSP/Taglib).

I'd like to expand its goal and make it a framework for building in-container testing solutions. Cactus would still offer an implementation for J2EE component testing but it will also open up an API for plugging other implementations. Some ideas are shown on the diagram below.

cactus_new_vision.jpg

For this to happen, the core helper classes will have to be separated from the HTTP protocol implementation and the existing Cactus TestCases. 2 SPIs will appear:

  • one for plugging in different protocol implementations (RMI, JMS, etc). Currently Cactus provides the HTTP implementation.
  • one for plugging in custom test case implementations (still looking for a good name for these). Currently Cactus provides the ServletTestCase, FilterTestCase and JspTestCase.

Moreover, the Cactus integration modules (aka front-ends) will also need to provide clearly-defined extension points to help automate the whole process of starting the container, deploying components, running the tests and shutting down the container.

I'm currently working on the Cactus code to make the 2 SPIs surface. The first test drive of these new SPIs will be to implement support for EJB TestCases.


Comments

Cool, keep in mind however backward compatibility and be nice to early adopters.

--depeupleur, December 1, 2003 08:45 PM

I already use cactus to do in-container testing
using ServletTestRunner.

What it seems to me that you're trying to do here
is protocol testing.

--Scott, December 2, 2003 03:52 PM

Hi Scott,

I'm not sure I get you. What I'm trying to do is simply to open up Cactus's internal API so that power users and contributors can develop other extensions. For example, ATM Catcus does not have an EJB Redirector. By opening up the Cactus SPI, developers will be able to easily add support for EJB Redirectors. More precisely, Cactus could then be used as a toolbox for testing any kind of component inside their container. Of course, this is just a vision ATM. We need to verify if it's a valid vision and we can make it happen :-)

The protocol is not the main part. However, it's needed to communicate between the cactus client part and the cactus server part. It's not related to testing of components. It's internal cactus plumbing.

Thanks

--Vincent Massol, December 2, 2003 04:06 PM

Hi,
This is Hemadri. I'm writing an article on "Server Side Testing Using Cactus". can u give me a detailed description on this which will be helpful for my artcle?.

--hemadri, August 16, 2004 07:16 PM

Hi Hemadri,

You can find all information here: http://blogs.codehaus.org/people/vmassol/archives/think_tank.html#000520_cactus_v2_architecture_proposal

--Vincent Massol, August 16, 2004 07:26 PM

hi!,
i would like to have some sample test cases, with regard to testing JSP's in the MVC pattern.

--shastry munnagala, November 18, 2004 10:45 PM
Post a comment









Remember personal info?