Jeff,
----- Original Message -----
From: "Brekke, Jeff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 8:15 PM
Subject: RE: Another point of Mock vs In-Container approach
> I guess I was commenting since I'm exploring similar situations to your
> example where we want to test code that is written against a framework
like
> Struts or Turbine, but I don't want to end up testing the framework. I
> was/am thinking that using MO will allow me to test my code, instead of
> testing the framework. Enough, sorry for moving OT.
>
No, no problem at all. I'm glad you got in the discussion. Sorry, what does
"OT" mean ?
Using MO will certainly allow you to test your code. So will Cactus. It is
just 2 different ways of doing unit tests, each doing it with a different
goal in mind :
- MO focuses on finely testing your code logic by isolating it from it's
surrounding,
- Cactus focuses on slightly more coarse-grained tests but also gives you
better confidence that your code will run correctly in it's deployed
container. Also, it let you test interactions between objects. Some consider
Cactus tests to be "integration tests".
When it comes to testing you must make a choice up to where you want to
provide tetss for your code:
A- fine-grained unit tests (MO)
B- coarse grained unit tests that test container interaction and deployment
(Cactus)
C- Functional tests (HttpUnit, Cactus to some extent)
D- Acceptance tests (some commercial tools and HttpUnit to some extent)
Provides tests for A, B, C and D is quite a long process and you need to be
seriously motivated.
Cactus was meant to be a middle ground and provide you with a good dosage of
confidence of your code.
The goal of Cactus is to try to provide enough in the realm of unit tests.
Ayn thoughts ?
thanks a lot for your participation!
-Vincent