This is actually my first encounter with Mock Objects. Have read through the
Pros and Cons article and http://www.sidewize.com/company/mockobjects.pdf.

I really like the idea of being able to defer infrastructure choices, and
that with a single methodology, I am able to test all my applications,
server-side or not. Given that, it is a major concern that there is not
reassurance that the my development code actually works in the given
container or deployment platform of choice. Also, not being able to adopt a
build methodology for testing would be a concern for many.

One way to do it would be to develop (and Test) using MO and deploy in IC.
That would be too tedious of course. The Pragmatic Programmer advocates that
we should "automate everything" and "avoid duplication", and it further
suggests ways to generate code.

How about that? A build framework which generates IC test code from existing
MO test suites. That way, part of the build process tests the code IC.
Evolving Cactus into a true testing framework, both server- and client-side.
Use MO during development, and IC for deployment.

I haven't really addressed some of the more fundamental issues of MO, but
have focused more on the development/deployment side. Maybe someone can shed
some light there?

By the way, is MO and IC related to the discussion earlier by Jerome Banks
about "creating concrete representations of HttpServletRequest and
HttpServletResponse" and the like...

----- Original Message -----
From: "Vincent Massol" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 12, 2001 8:21 PM
Subject: Mock Objects vs In-Container/Cactus


> I have discovered this week a new strategy for unit testing code : it's
> called Mock Objects. It enables unit test of all kinds : standard java
code,
> servlet, EJBs, ... The strategy is differrent from the we use in Cactus
> (that I have named "In-Container testing"). Thus, I have written an
article
> explaining both strategies and the pros and cons of each.
>
> It is available on the Cactus web site at :
> http://jakarta.apache.org/commons/cactus/mockobjects.html
>
> I would very much like to have your opinion on that subject. If I receive
a
> lot of positive answers, it might mean that we'll change the way Cactus
work
> in order to do it the Mock Object way. As this is a big change, I'd like
to
> have your opinion on that.
>
> I guess Struts users should be very interested in it as it could provide
> very efficient way of unit testing struts code (The benefits are actually
> the same of any Jakarta framework users).
>
> I'm very excited about this ... Please tell me quickly what you think !
>
> Thanks for your time.
>
> Vincent Massol
>
>

Reply via email to